Redux devtools statePersist refreshing

811 views Asked by At

When I want to use the statePresist tool (the debug session) I put a query string at the end like this: http://localhost:3000/#/?debug_session=tal

and if I play with the state, and then refresh, I lose my query string (?debug_session=tal is gone).

so I'm in a blank state.

is there a way to refresh and keep the state? (And I also would like to achive that i will work with routing - Like im in my index screen with debug session, and then I move to ./articles , and even when I'm not in my index I would still get the same session).

thank you ! :)

1

There are 1 answers

0
Zalmoxisus On

Redux DevTools Extension already includes the persistState enhancer and there's not much you can do here except adding debug_session=tal from your code when changing the location.

In order to solve this and other issues with localStorage quota and unserializable data, I made a PR, so you'll be able to get the state persisted right from the extension without using localStorage and adding anything to the url.