react-bootstrap-sidebar-menu icon indicating copy to clipboard operation
react-bootstrap-sidebar-menu copied to clipboard

react-router programmatically navigate does not change 'active' class

Open AlveeAkash opened this issue 3 years ago • 0 comments

Scenario:

Currently, I am visiting "p1", I am posting some data, then redirecting to user to "p2" using - const navigate = useNavigate(); navigate("p2"); It redirects perfectly fine, and also add the 'active' class to the 'p2'.

Problem: It does not remove 'active' class from 'p1'. as a result, after the redirect, it shows both of the link/page 'active'

image

Expected: It will only show 'p2' page 'active'. not 'p1' anymore.

AlveeAkash avatar Dec 28 '22 22:12 AlveeAkash