Whenever you reload your app, the javascript process has nothing in memory. You will have to re-initialize state, and maybe set some basic state ...
For further actions, you may consider blocking this person and/or reporting abuse
Just a quick note, you pass the persistReducer instead of your newly created persistedReducer here:
Thanks Bro,
I assumed there is a typo mistake in Step 2
//pass the persisted reducer instead of rootReducer to createStore//
So the first argument of
configureStore
method should bepersistedReducer
, notpersistReducer
...Is it true ?
Hi!
What if I only want to persist the store after a user has authenticated?
For example, when someone visits my page an authentication check is made (token then session restored), but if no session is found, the page redirects to /login. PersistGate would delay the rendering of this page until a persist process completes, preventing anyone without credentials to access the page (in practice, no one access).
Dispatch your action only after verification
thanks alot! was very helpfull!
My Pleasure buddy! 😁
Can we change the default storage of redux persist to sessionStorage instead of localStorage?
Wouldn't this be useless? I mean the sessionStorage gets cleared when the tab gets closed, the same behaviour would occure if you simply use redux without redux-persist?
+1 on that
github.com/rt2zz/redux-persist?tab...
@bhatvikrant I will assume you guru in redux persist, if you solve this issue. Im stuck for 2 Months. Plz Help
stackoverflow.com/questions/695872...
so Great article
tnx alot bro
Glad to help buddy! 😁
Thanks a lot
My pleasure!
I'm dispatching a user details, and everything is been saved into local storage, is that not dangerous??