NextJS routing
Anyone using NextJS ? I have a homepage that displays a grid. When I click on a cell, I want a popup to appear at the center of my screen. I also want my URL to change and add query parameters with the id of the cell, so that when users share that URL, the new user will have the popup displayed automatically without clicking.
I know that NextJS has its own system of routing based on pages organized in folders. But in my case, it's more like a traditional SPA. Does NextJS have any native routing system to handle that case too ? Or I should npm install React router ?
4 Replies
Take a look at this https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#modals
Routing: Parallel Routes | Next.js
Simultaneously render one or more pages in the same view that can be navigated independently. A pattern for highly dynamic applications.
yea
so
Routing: Linking and Navigating | Next.js
Learn how navigation works in Next.js, and how to use the Link Component and
useRouter
hook.this is how client side navigation works
in nextjs app router