Please enable JavaScript.
Coggle requires JavaScript to display documents.
Next.js - Coggle Diagram
Next.js
Routing
-
When a file is added to the pages folder in a project, it automatically becomes available as a route.
By mixing and matching file names with a nested folder structure, it is possible to pretty much define the most common routing patterns
-
-
-
-
-
-
Routing Summary
- Page base routing mechanism - Pages are associated with a route base on their file name.
- Nested routes - Nested folder structure, files will be automatically routed in the same way in the url
3, Dynamic routes - Can be created by adding square brackets to a page name.
- Catch all routes - Add three dots inside square brackets to create a catch all route. Helpful when you want different URLs for the same page layout or even when youre working with pages where some of the route parameters are optional
- Link component to navigate on click of an element
- useRouter hook's router.push method to navigate programmatically
- How to create a custom 404 page.
-
-
-