正在加载视频...

视频加载失败

Conditional parallel routes in Next.js

108,935 次观看 • 2 年前 •via X (Twitter)

9 条评论

henrique ↑% 的头像
henrique ↑%2 年前

Amazing!! How apply this with TypeScript? The type of user and admin in props Layout?

Fredkisss is on 🦋 blue sky 🦋 的头像
Fredkisss is on 🦋 blue sky 🦋2 年前

You still need to make sure to add a condition role check in each parallel route because they are still executed even if only one is rendered.

Alex Sidorenko 的头像
Alex Sidorenko2 年前

Ah, good catch! Thanks for pointing this out. Looks like a known bug.

Qing | quotion.co 的头像
Qing | quotion.co2 年前

Awesome, this is also useful for conditional layout like sidebar, e.g. declare 2 sidebar routes for various scenarios(/site and /team)

moni 的头像
moni2 年前

what tool do you use for editing / recording these videos?

chronark — oss/acc 的头像
chronark — oss/acc2 年前

well that was incredibly simple to understand, kudos!

Eyk Rehbein 的头像
Eyk Rehbein2 年前

Okay now that’s a great advantage compared to the pages router

Umair 的头像
Umair2 年前

Which video editor is this?? Alex

Alex Sidorenko 的头像
Alex Sidorenko2 年前

@hyeumair This was a combination of Apple Keynote and @Remotion with a custom setup. I spent waaaay too much time on this 😅

相关视频