getInitialProps Data Fetching | NextJS Crash Course

preview_player
Показать описание
In this video we take a look at how you can fetch data in NextJS using getInitialProps. We fetch data from the GitHub API as an example.

getInitialProps enables server-side rendering in a page and allows you to do initial data population, it means sending the page with the data already populated from the server. This is especially useful for SEO.

(0:00) Introduction
(0:40) getInitialProps
(3:22) looking at the generated code
(4:18) Another example
(5:03) NextJS 9.3 or higher exception

NextJS Crash Course Video Outline:

I send out one email the first day of every month with new YouTube videos, Medium posts, stuff I’ve been working on, and anything else programming related I’ve found interesting.

🎒 My Gear 🎒

📧 Connect with me 📧

#nextjs #getInitialProps
Рекомендации по теме
Комментарии
Автор

Great Video. Really simple explanation. Waiting for the next one! :D

bonniesimon