I need to persist Redux Toolkit state to browser session storage. I need to do this so that Redux Toolkit state is maintained when the page is refreshed. Some googling seemed to indicate that redux-persist is a good option for this. I was also able to piece together a working implementation for this which saved to browser local storage which seems to be the default approach for redux-persist. I need to save to session storage but I found it more difficult to find a working implementation for that.
So one question is - is redux-persist hands-down the most popular choice for persisting redux-toolkit state across page refreshes - for now and the forseeable future? redux-persist's npm page shows that the package gets over 500k downloads per weeks so obviously it's massively popular. But I also noticed that the last update to this package was 3 years ago so it seems like the package isn't actively maintained.
Also, it seems like the ability to save state to browser session storage is a pretty basic design need so it seems like this would be something that redux-toolkit would eventually incorporate as part of its standard package - or at least as some type of optional/ancillary package offering. Does redux-toolkit have anything like this or do you know if that's something that the redux-toolkit dev team has on their roadmap?
Also, I noticed that the Redux Toolkit docs provide specific instructions for using Redux Toolkit with redux-persist. react-redux-firebase is the only other tool that the redux-toolkit docs call out. So it seems like redux-persist is currently the de facto standard for persisting global state across page refreshes when using redux-toolkit. Is that the general concensus in the redux-toolkit dev community? Are there any new developments in the pipeline that I should know about?
One last thing - I was able to get redux-persist to save to the default target of local storage in my nextjs app but I was having some issues using redux-persist to persist redux-toolkit state to browser session storage. Do you know of any public repos which provide a good code example for this?