Next.js Discord

Discord Forum

Next.js dynamic route is giving error.

Answered
American posted this in #help-forum
Open in Discord
AmericanOP
In root page.js I've rendered the components as client components and I want to show a single product detail when I click on it. So I used dynamic route and this gives the error , look at the picture
Answered by Ray
like the error said, use next/navigation instead
View full answer

4 Replies

Answer
AmericanOP
juat replacing the useRouter , will it be fixed?
@American juat replacing the useRouter , will it be fixed?
yes it should, You have to use next/navigation with app router
AmericanOP
Thnaks a lot @Ray