Next.js parallel routes are awesome (if they worked correctly)

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

lol it's funny how this is frustrating cuz this is my whole life working with libraries like this. For example, storybook has tons of issues all the time esp with tailwind, if you try drizzle-orm you'll be encountering tons of things you wish were like this or that or aren't documented yet, next 13 has compatibility issues with this and that. Jest is really not good with ESM stuff. Welcome to the world of problems 24/7 lol. That said... you've also encountered issues and shared your experiences with AWS Amplify so you've had your fair share too, and we're thankful that you shared those struggles

williamx
Автор

I wonder if "beta' would have been a better description of the app router at this point?

Looking at the issue report, It looks like this bug was discovered in the "pre-production version" of the app router (13.3.5-canary.12) and wasn't reported until May 4th which was after the release cut of version 13.4 (13.4 was released on May 4th, so that build happened prior). Regardless, if there is a better solution it should appear in the issue report, I would hate to think that other "solutions" are being documented elsewhere causing even more confusion. That's just me though.

Keep an eye on their docs as the folks at next.js iterate their documentation weekly or bi-monthly. This "workaround" should show up there unless they have a patch ready to release on the next patch release date (which I have no privy to that knowledge).

I'm loving these little tutorials you are presenting as well. I've seen a few other youtubers tackle the big points of the app router, but it seems (from my perspective) that you are the only one demonstrating all the little nuances of the app router. Please keep it up and thank you.

SeattleSpursFan
Автор

thank you for making this video, i mentioned the parallel routes stuff in your previous video and I knew that you are going to make a video for it 🤠

amershboul
Автор

I am too digging into next app router and your videos a so great, it is like a friend who doing like what I do and he's sharing what he learned with me

essaadi_elmehdi
Автор

i faced some issues with parrallel routes as well. they would be perfect for my usecase but that will have to wait till they are stable.

what you can try is creating another routegroup that wraps your parallel routes and put a layout in there that holds the main ( in my case the navbar)

(app) > layout[with main] >> @left (hack) > layout, loading | @right (hack) > layout, loading

dinoDonga
Автор

I've had the same (sort-of) issues with the Nextjs documentation lol. I was particularly working with React Context, followed their instruction down to the tee, and it still did not work. Turns out I had to make a Reddit post asking about the problem to even have it working properly as intended.

waffensultan
Автор

thanks for mentioning the bug and also provide a related github issues

yomaru_
Автор

extension for your file file tree to show like that??

Harish-rzgv
Автор

While i was deploying the app it throw the fetch error in production it works fine in localhost don't know why .it was showing fetch + prerender error

nabinsaud
Автор

I am not getting why parallel routes in itself is useful unless used together with interceptors .. or can someone help. me I say this because if the sole purpose is to handle the loading and error states then we can use the suspense on a giant component in the page without using the parellel routing .. can someone please help me know if I am making any sense and shed light to what exactly makes this feature unique

justiceessiel
Автор

If there are still bugs in nextjs app directory, then why they say that it's production ready and stable?

ZiaCodes
Автор

Did you try to get rid of props.children and just make it children only like it is in the root layout? It is pretty weird because pokemon/other should work the way you have set it up, perhaps like you said yourself it can be a bug. Great video, tbh I haven't touched parellel yet. Might give it ago, currently working with an pagination setup with Prisma where it takes 30 documents from the DB, that does also cache it with Redis and it gives some issues to implement and is very slow or need to load everything in at once through an transaction, dunno. It is vague because I don't understand it properly myself.

martijnjansen
Автор

I was having (different) issues while trying to create a modal route.. I resolved it by adding a default.tsx component that returns null in the @ folder

mattd
Автор

did you ever try to put the page.js of the another folder into a (hack) folder?

gregattack
Автор

is there a benefit of using parallel routes instead of server components with suspense?

frunzasergiu
Автор

Try to add that props.left and props.right inside the RootLayout

pthiago_s
Автор

if you dont make a default.js inside both slots you wont be able to render another because there would be nothing in the same level.

revdznet
Автор

Apparently that intercepting route also has some bugs

pthiago_s
Автор

Your loading components are just functional components that return html, you have them marked as async?

jasonmcpeak
Автор

Route groups is not a hack solution but they do need to update the documentation on parallel routes about that...

Daddyjs