Routing in NextJS

NextJS automatically creates routes for all files stored in src/pages directory. Dynamic routes can be created using "/pages/product/[pid].tsx" syntax. You can link pages using "Link" component from nextJS. with Link, you can do client side navigation. With normal anchor tag, requests are sent to server. next/router and next/link are important components used in routing.

Complex problems, Simple Solutions