Navigation überspringen
Modal with intercepting route in Next.js 13
0:00 / 1:44

Modal with intercepting route in Next.js 13

Alex Sidorenko

@asidorenko_35.152 Follower

Auf X besuchen
1.529 LikesHerunterladenOriginalbeitrag

161.790 Aufrufe

Modal with intercepting route in Next.js 13

9 Kommentare

Kommentare aus dem Originalbeitrag auf X (Twitter)

  • Profilbild von Haz

    @diegohaz

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

    15 Likes

  • Profilbild von Alexander Kachkaev

    @kachkaev

    @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!

    8 Likes

  • Profilbild von Sidi jeddou

    @sidi_jeddou_dev

    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.

    5 Likes

  • Profilbild von Mattèo

    @MatteoGauthier_

    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?

    5 Likes

  • Profilbild von Alex Sidorenko

    @asidorenko_

    Apple Keynote with Magic move

    15 Likes

  • Profilbild von Arghya Das

    @itsarghyadas

    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.

    2 Likes

  • Profilbild von Aaron

    @rncrmn

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

    1 Like

  • Profilbild von MONARCH

    @ugbahisioma

    This is so confusing

    1 Like

  • Profilbild von Luca Matteis

    @lmatteis

    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

    1 Like