Loading video...

Video Failed to Load

Go Home

Modal with intercepting route in Next.js 13

161,742 views • 3 years ago •via X (Twitter)

9 Comments

Haz's profile picture
Haz3 years ago

That would be much easier if I could express that logic in code rather than using file conventions.

Alexander Kachkaev's profile picture
Alexander Kachkaev3 years ago

@rauchg Sadly, intercepting routes don’t currently work if you need modals only on some pages. For example, you want previous and next product to not be opened in a modal, while you are on a product page. I shared a reproduction in – hope this will be fixed soon!

Sidi jeddou's profile picture
Sidi jeddou3 years ago

I implemented something like this, but doesn’t use the query, it changes the url param without reloading and shows a modal with data, exactly like product hunt. It’s open source btw.

Mattèo's profile picture
Mattèo3 years ago

Hey @asidorenko_ I see a lot of your tweets about RSC in my TL, the rendering of the videos is nice, how do you animate the source code on the left side?

Alex Sidorenko's profile picture
Alex Sidorenko3 years ago

Apple Keynote with Magic move

Arghya Das's profile picture
Arghya Das3 years ago

Could you please explain the process of creating this video showcasing code transitions? I'm considering sharing something similar with my project and would appreciate understanding how it's done.

Aaron's profile picture
Aaron3 years ago

This is awesome!! how do you make videos like this?

MONARCH's profile picture
MONARCH3 years ago

This is so confusing

Luca Matteis's profile picture
Luca Matteis3 years ago

Just a note. Intercept is only needed if you want an entirely different page on refresh of the modal. If you just want the same modal, parallel routes can be enough