Replies: 1 comment 4 replies
-
Can you not subscribe to route changes and clear store? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a Zustand store used to manage form alerts. I want to destruct the state upon navigating with React router.
It works well, but the problem is that I only want the alert to remain in State until the user navigates to a different page; whereas Zustand keeps it around.
Am I going about this the wrong way? Other options I could use are;
React.useState()
instead of Zustand.Beta Was this translation helpful? Give feedback.
All reactions