How to use path params with next.js app router #shorts

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

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

bro... I can't believe a 1 minute video just solved my problems... after hours of scavenging 30min videos lol! thank you so much chief! o7

myrez_
Автор

For anyone that's trying to retrieve the slug via other means ( eg: next/headers ), DO NOT! Use this method, this won't cause any errors when running builds! Props to you man, saved me a lot of hours of research.

IoanAlexandruAndrei
Автор

Thank you. I didn't realize it had to be in the main component to work 😅

NyxAnderson
Автор

After watching 3 proper tutorials, finally reached the correct video🙃👍🏿👍🏿

ArtiSingh-dxvh
Автор

Earlier I nested the slugs for 2 levels, eg [category]
[item]
index.js

In pre Nextjs 13 and it works fine now I am wondering if still works in Nextjs 13 ?

tk_codes
Автор

Is there any chance of this working with intercepting routes ??

qudusayo
Автор

how to change the params? for example its show "hello%world" how to change it as "hello-world" like normal url?

dwisetyoaji
Автор

Informative video! I have one question! How would you approach the conditionally rendered component based on the route? For example, there is Header component display in landing page(display list of products), Product detail page. But for edit product route, i dont wanna show the header.
I cant really come up with idea without duplicating the Header component for each page and i would like to hear your approach

Ok-jhxx
Автор

Hi... When I click on a component! Am pushing parameters and want to add some parameters in a message i compose on whatsapp?

affiliatepaid
Автор

I think we can do usePathname() hook, can't we?

marszalkowskiolivier
Автор

What if query params? Like ?id=123search=hello?

MrJeszam
Автор

Sorry but the url is not showing in the video. It's kind of cropped. So did you enter posts/helloWorld?

BoxingSwe
Автор

What do the parentheses around the auth folder do?

Oshimani