Next.js Discord

Discord Forum

router.push not unmounting components correctly?

Unanswered
Oak rough bulletgall wasp posted this in #help-forum
Open in Discord
Oak rough bulletgall waspOP
Just updated from 14.1.4 to 14.2.2. We have an intercepting route that is a modal. Within that modal we have a button that does a router.push() back to the page where a button exists that originally opened the modal. If I click my button in the modal to put me back on the main page, and try to reopen my modal, I see the URL change to the intercepted route, but the modal does not come up anymore. This worked fine on 14.1.4. Also using router.back() works, but in our use case we need router.push here. I am trying to replicate this in code sandbox but cannot import useRouter for some reason.

1 Reply

Oak rough bulletgall waspOP
If my question is not clear enough, please let me know.