DEV Community

loading...

Discussion on: How to make routable modals in react with react-router

Collapse
akaguny profile image
Alexey

i'd like to navigate for all of the application =)
sometimes in application some forms access only in modals =( but if i have route i can save link =)
maybe in this cases i should take feature request, but we know how long minor/trivial tasks live in backlog =)

Collapse
unorthodev profile image
Mayowa Ojo Author

Hi, thanks for your comment. I assume you mean you want to be able to navigate throughout the application while also having routable modals. With this setup, you can. The modal doesn't affect your normal navigation flow. That's why the modal is only rendered when there's a background state. Also you can have a modal wrapper component and render different components inside the wrapper if you want multiple modals.