Vai offline con l'app Player FM !
Better Routing in React with NextJS
Manage episode 306482960 series 2954559
Do you find React Router cumbersome or tedious to work with sometimes? Or are you just curious how routing could be done better? In this episode we take a look at how routing is done in NextJS. We discuss what it looks like and how to use it. And we also offer our opinions on the NextJS routing mechanism itself.
Show Notes
- Intro
- Overview
- What is routing? What are routes?
- routing is choosing which component to render for a given path and in nextjs, or API routes
- relevant multi-page apps
- Before Nextjs
- vanilla react
- react router
- how to create routes
- With Nextjs
- pages/routeName.js
- nesting
- Dynamic Routes
- blog
- using getServerSideProps to load slug [slug].js from sanity
- getServerSideProps Redirect example
- Opinions on: file based data-store / framework / NextJS
- Api Routes
- api folder
- dynamic routes
- auth0 library
- Summary
- Outro
101 episodi
Manage episode 306482960 series 2954559
Do you find React Router cumbersome or tedious to work with sometimes? Or are you just curious how routing could be done better? In this episode we take a look at how routing is done in NextJS. We discuss what it looks like and how to use it. And we also offer our opinions on the NextJS routing mechanism itself.
Show Notes
- Intro
- Overview
- What is routing? What are routes?
- routing is choosing which component to render for a given path and in nextjs, or API routes
- relevant multi-page apps
- Before Nextjs
- vanilla react
- react router
- how to create routes
- With Nextjs
- pages/routeName.js
- nesting
- Dynamic Routes
- blog
- using getServerSideProps to load slug [slug].js from sanity
- getServerSideProps Redirect example
- Opinions on: file based data-store / framework / NextJS
- Api Routes
- api folder
- dynamic routes
- auth0 library
- Summary
- Outro
101 episodi
Tutti gli episodi
×Benvenuto su Player FM!
Player FM ricerca sul web podcast di alta qualità che tu possa goderti adesso. È la migliore app di podcast e funziona su Android, iPhone e web. Registrati per sincronizzare le iscrizioni su tutti i tuoi dispositivi.