DEV Community

Discussion on: Do you need a State Management Library?

Collapse
 
rowlinsonmike profile image
Michael Rowlinson

From my experience, I like that it is dead simple. Recoil is close but still requires Context providers. I like that state is easily manipulated outside of components as well. There are many complex use cases in the docs implemented in very clever intuitive ways, like its use of immer for reductions and transient updates.

Thread Thread
 
jerevick83 profile image
jerevick83

How do you work around it's persistency? I tried using it to persist basic user data but that became messier as there was lots of persisted data in the localstorage for even signed out users. I mean lots and lots of them.

How do I persist and clear the entire storage after signing out?