#Anyone know how to use the Accordion with React Router?

7 messages · Page 1 of 1 (latest)

dark mountain
#

I'm not sure how to combine the two.

rain marsh
#

what do you mean?

dark mountain
#

Imagine a multi-step form presented in an accordion. As each section expands, I want the URL in the browser to update. So think tab navigation with routing.... but instead of tabs I want to use an accordion.

chilly wharf
#

you could try using the useNavigate hook from React Router and passing in replace false into the options when changing accordions

#

It should change the url without actually navigating

#

Actually nvm, that won't work

#

probably use window.replace to update the url