Dynamic Catch-all Routes in NextJs 14
Вставка
- Опубліковано 16 лип 2024
- In this video, we'll look at dynamic routes, catch-all routes, and optional catch-all routes in NextJs 14.
👉🏼 My courses
→ www.hamedbahram.io/courses
👉🏼 Project source code (Github)
→ github.com/HamedBahram/next-d...
👉🏼 Next shadcn template (Github)
→ github.com/HamedBahram/next-s...
👉🏼 Work with me
→ www.hamedbahram.io/hire
Chapters
0:00 Intro
1:00 Documentation
10:30 Project setup
12:40 Shared layout
15:00 Catch-all route
20:00 Active links
22:20 generateStaticParams
26:25 Recap - Наука та технологія
Your videos are awesome Hamed, please, never quit doing them...
Thanks, I appreciate that!
Thank you, Hamid. I truly wish I had a teacher like you during my High school days and in College now. Each video on your channel contributes significantly to my growth as a developer. Thanks once again. 🙏
Thank you! I'm so glad to hear that I've been able to help you in your journey.
Hamed thank you very much! Your explanations are the best
Glad to hear that!
Great explanation as always! Even if I knew this, your example project made it stick into my head, thanks!
I'm glad to hear that 🙂
thanks for your video,it was very helpful for my project just in time, I did similar to this but didn't know about all catch all folder witch help me organize it better
Awesome, I'm glad it helped!
Eid Mubarak Brother .Thank You For Your Contribution In React Community .
It's my pleasure
Thanks Hamed, you are awesome bro 😎
Thanks man! I appreciate it.
Very helpful. As for now, there is not a lot of info about Next 14.
Glad it was helpful!
Absolutely perfect explanation!
Glad you liked it!
thank you bro, highly appreciate it
My pleasure!
really great video thank you
You are welcome! Glad it helped.
Thanks a million 🎉
My pleasure!
Nice explanation. Currently working on my side project, and I have a case staticPath/[location]/[type]/[criteria]. The idea was to duplicate code for each dynamic path or catch-all routes. Duplication allows more granular control without 'else if' cases. And catch all routes is good because in my case is just a filter option and all content will be almost the same (just different titles, metadata for SEO). I am also interested in how you sanitise slugs, or do you trust security features that come from ORM?
Thanks! I personally prefer the path with less code duplication. You can also sanitize slugs or search parameters using something like zod.
this is such quality content
I appreciate that!
Very good
Thanks!
explained very nice, but i have a question we can use the cookies inside generateStaticParams ?
Thank you! Give it a try and let me know :)
@@hamedbahram i got this error how we can solve it ------> headers() expects to have requestAsyncStorage, none available
how catch all different from by default params coming in page it also gives array of params
Only catch-all and optional catch-all routes have an array of strings for the params. The regular dynamic route just returns a string.
@@hamedbahram thanks for your content brother
@@techGPT97 my pleasure brother!
hello
Hi 👋🏼
My eyes man.. please use dark mode in your vids 🥲
Absolutely! I'll that in mind