Better Routing in React with NextJS

05/11/2021 59 min Temporada 1 Episodio 23
Better Routing in React with NextJS

Listen "Better Routing in React with NextJS"

Episode Synopsis

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 NotesIntroOverviewWhat is routing? What are routes?routing is choosing which component to render for a given path and in nextjs,  or API routesrelevant multi-page appsBefore Nextjsvanilla reactreact routerhow to create routesWith Nextjspages/routeName.jsnestingDynamic Routesblogusing getServerSideProps to load slug [slug].js from sanitygetServerSideProps Redirect exampleOpinions on: file based data-store / framework / NextJSApi Routesapi folderdynamic routesauth0 librarySummaryOutroSupport the show