It is used to store the state of the user and can be reused within the application.
Now, in retrospect, it's over engineering since the developer can access the local storage and store it in state.
Thanks for pointing this out
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