E
Yeah, that's true. A simpler approach would be to set "isUserSignedIn" to true after successful login and remove it when the user clicks the logout button. The only logic that will be handled on auth change is setting the current user. Chinenye Anikwenze
ReplyArticleSep 11, 2023How to prevent React ProtectedRoutes from Redirecting to Login on Page Reload