Coursify
Create New CourseGalleryContact

NextJS

Unit 1
Routing
Routing BasicsRouting AdvancedCustom Routing
Unit 2 • Chapter 1

Data Fetching Basics

Video Summary

This is a tutorial on how to fetch data from an API endpoint in Next.js. The tutorial starts by explaining that the data should be fetched before the component is rendered so that the rendered components have data in the template. Next, the tutorial shows how to use the getStaticProps function to fetch data. This function is called at build time, so it can be used to fetch data that is not available in the browser. The tutorial then shows how to map through the data and output it in the template. Finally, the tutorial adds some styles to the page.

Knowledge Check

Where do we fetch data from in Next.js?

How do we use the data we fetch in Next.js?