You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
in my App on the refresh I send a request with a token to authenticate the user, on the response I update Redux Store with the currentUserData and authed:true
when the user visits a page from any route all working fine as the data already in the store.
but when refresh I check if !currentUserData.authed I redirect him to the login page.
the problem now the page redirect as the store not updated yet
I'm looking for a way to load the page after making sure that the store is updated as this request happen outside the page.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
in my App on the refresh I send a request with a token to authenticate the user, on the response I update Redux Store with the
currentUserData
andauthed:true
when the user visits a page from any route all working fine as the data already in the store.
but when refresh I check if
!currentUserData.authed
I redirect him to the login page.the problem now the page redirect as the store not updated yet
I'm looking for a way to load the page after making sure that the store is updated as this request happen outside the page.
Beta Was this translation helpful? Give feedback.
All reactions