Next.js Discord

Discord Forum

Parallel Routes, Intercepting Routes, Pages Router

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
We have a large nextjs app that could benefit from some UX niceties that the app router affords through parallel and intercepting routes.

I was curious if there is the ability to intercept routes from the pages router when on a route in the app router? I assume no but I know we all like to push boundaries

Also, would be absolutely awesome if we could just say

const router = useRouter()

if (router.pathname.includes('somepath') {
  router.intercept('anotherpath')
}

Personally the file path intercepting routes due to using file base routing get really confusing but it is nice to use when you figure it out

0 Replies