Is it possible to create a persisted redux store for each user?

23 views Asked by At

I am using Redux-Toolkit together Redux-Persist to store the state in the case the page is refreshed. This works great with one user but how can this be managed with multiple users? If user A signs out and then user B signs in, how can I persist both user's state?

The recommended way is to use only one store, but is it possible to switch between different store instances and storing them with persist?

I couldn't find any similar approach so this thinking might be flawed. A database could be used to store a simple user settings like theming but I wouldn't use it for the entire state.

0

There are 0 answers