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
You might want to combine the logout util and the logout button. The reason I say this is
because you'll probably want to redirect back to the / route when the user logs out, and this requires the useHistory() hook, which can only be called in a component function body or a custom hook
because you're unlikely to call the logout function outside the logout button.
The recommended way to redirect explicitly in react router 5 is the useHistory() hook, combined with history.push()
You might want to combine the logout util and the logout button. The reason I say this is
The recommended way to redirect explicitly in react router 5 is the
useHistory()
hook, combined withhistory.push()
then render this logout button on the sidebar👍
The text was updated successfully, but these errors were encountered: