Is it possible to write a short example of a custom persistor? Like even if much of it is ust pseudo-code? The types are super generic, returning any for just about everything.
My big question is for the getItem method, am I supposed to return the state as an object or as stringified json, since the setItem method is fed a json string?
Thanks in advance.