React authentication flickering issue in changing route
React authentication flickering issue in changing route I'm building several application in react , the last one is a admin panel so my react app must have authentication, absolutely all of my products used Server Side Rendering . react react Server Side Rendering For The last case, back-end team use pass me Token for handling authorization, they technologies are Java , Spring , Redis and etc base. Token Java Spring Redis When I send username and password to their server, If the information be correct, they send for me token and something else, I store it in localStorage and change the root state of react application as login, because of this change app use a different routing . username password token localStorage state react routing Everything looks good but what happen when I refresh the page? here the issue will happen, the login state is false so app goes to login page, in componentDidMount I read the localStorage and find out Oah! I got the token before and th...