Question:I’m using React Router Dom
v6. So for my web application, I created a Redux action in
logoutUser, and in view
dashboard.jsx, I added a logout button that should navigate me to the home page
('/'). My problem is that clicking on logout does nothing, is my code wrong?
logoutUseris returning a function instead of executing the tasks you want. You either change it to:
onClickpart, to the code below, so you execute the function retuned by
If you have better answer, please add a comment about this, thank you!