setItem's value isn't `any`, but `string`, because serialization happens before calling storage.setItem().
Krzysztof-Dziardziel opened this issue · 2 comments
Krzysztof-Dziardziel commented
Krzysztof-Dziardziel commented
I was getting string as a fallback of serialize method, because it was returning console.log(state).
soc221b commented
The serialization can be customized, e.g., you may want to store objects to IndexedDB
:
https://github.com/iendeavor/pinia-plugin-persistedstate-2#common-options .