In this tutorial we'll talk about fetching data from an API in a Next.js application. The tutorial covers some fundamental theoretical concepts about data fetching in a modern web application and dives into specifics about Next.js data fetching. Next.js supports fetching in server-side components with the native Fetch API and async await. Fetching in next is static fetching with cache. Next provides different methods to revalidate request cache at a time interval (in the background) and by pinging an API endpoint (on-demand). Additionally next optimizes fetch requests by deduplicating multiple requests to the same endpoint.
Contents:
0:00 Introduction
0:11 Client vs Server Fetching
0:53 Fetching Data in a Component
1:57 Accessing HTTP Headers and Cookies
2:33 Static and Dynamic Data Fetching
3:40 Background Cache Revalidation
4:02 On-Demand Cache Revalidation
5:29 Sequential and Parallel Fetching
6:47 Request Deduplication
7:13 Conclusion
Email: [email protected]
Twitter: / nikelaz
LinkedIn: / nikola-lazarov
#nextjs #course
Watch video Fetching Data from an API - Next.js Course #4 online without registration, duration online in high quality. This video was added by user NL Tech 12 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 4,993 once and liked it 120 people.