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
I am learning react js and i want to check if authentication token is set or not in localStorage before the component renders.
Currently i am trying to do it inside componentWillMount method, but it gives me warning that localStorage is not defined.
So how can i access localStorage?