Skip to content

salvillalon45/the-nextjs-pagesrouter-guide

Repository files navigation

The Next.js Pages Router Guide

Intro

I created this repo to learn more about NextJS. I use it at work, but I want to take a step further and understand more on the features of Next.js using the Pages Router. I also create an article that explains what is Pre-Rendering and Hydration to follow along with the concepts covered in this tutorial.

Getting Started

In the GitHub repo you can find the code snippets for:

  • A page implementing getStaticProps and getStaticPaths

  • A page implementing getStaticProps

  • A page implementing getServerSideProps with Client Side fetching

  • A page to demonstrate Hydration Errors

  • Using the API directory to implement our own API routes

To run the application

  • Clone the repo
  • do npm install
  • do npm run dev