react_persist_login
react_persist_login copied to clipboard
Running in strict mode, in dev - accessing Admin (and users) instantly navigates to login
I may have introduced a bug, but when I run this using Strict mode in development, React mounts and then instantly unmounts the Users component. This cancels the axios request that was initiated by the use effect.
Canceling that request triggers the catch block on lines 22-25, which navigates the user to the login screen.
So, any time I navigate to the Admin/Users route, I'm instantly navigated to the Login screen.