How do I do client side routing in Nextjs?

26 Views Asked by At

The problem I want to solve is that when an item in a list is clicked, the user goes to a “details” page for that item. The list is dynamic and fetched based on a user search.

I am new to next, so the approach I took was to use <Link> with a dynamic path using the item's id. Then create a component in /app/page/[id].tsx

Based on documentation, this is client-side routing, correct? I was rejected from a take-home assignment because of this and want to understand what was incorrect with my approach so I can learn!

0

There are 0 best solutions below