Making Websites With Next.js And Strapi Episode 11

getStaticProps

In this episode I'm going to show you the difference between getServerSideProps and getStaticProps in Next.js

In Strapi we are going to create pages content type so that we can get the data for our pages from the API instead of hard coding them. For getting those pages in Next.js we are going to be using getStaticProps instead of getServerSideProps because we want our pages to be statically generated and to not require any additional requests. Also I’m going to show you the difference between those two types of fetching data.

Wanna ask a question about video?

Like This Video?

Support it by sharing it ;)

© Watch And Learn,2024