Course lesson
In this video we will learn how to use Notion's client library to request block data and display the details of each of our recipes.
In this video we will learn how to use Notion's client library to request block data and display the details of each of our recipes.
We will be pre-generating these static pages at build-time by using Next.js' getStaticProps function, however, because our recipe IDs can be a nearly infinite number of options, we need to explicitly tell Next.js every possible option we would like to create a static page for.
In order to do this, we use Next.js' getStaticPaths function. This allows us to make a request to the Notion API for all of our recipes, and provide Next.js with a finite collection of possible paths.
Course lesson
In this video we will learn how to use Notion's client library to request block data and display the details of each of our recipes.