4 Ways to Fetch Data in Next.js 13 | Explained in 200 Seconds

preview_player
Показать описание
In this short video, I explain 4 different ways to fetch data in a Next 13 app. I cover both server-side and client-side data fetching.

0:00 - Intro
0:03 - Static Data Fetching
1:00 - Static Data Fetching with Revalidation
1:45 - Dynamic Data Fetching
2:12 - Client Side Data Fetching
3:19 - Outro
Рекомендации по теме
Комментарии
Автор

AMAZING WORK! For me you did better than anyone else explaining this topic, it was on point, with quick examples and a clean code, it really helped me!
I loved the video and the edit, just sent to some friends, can't wait for more!

johncde
Автор

wow!!. This is Gold for data fetching in next js

HardikItaliya-fxgq
Автор

There's plenty of videos around showing how to fetch data for the server components, but noone is showing how to do for a client component. I'm already deep into my project and I couldn't find info on right way to do it. This helped me, thanks!

gromhellscream
Автор

This was actually very understandable as someone just learning next. Be prepared brother, might show up in your dreams if I find some topic hard to understand.

prabinshrestha
Автор

phenomenal video man! just a side note, it'd be better if you zoom your ide just a bit in

thequang
Автор

What if we need to use an API key in our .env file to make a request to (lets say google for geolocation) what should the proper patern/protocol for accessing your API key be? Thanks

El_Remolino
Автор

but that only works with json, can't use these with database.. I have to either use export const dynamic = "force-dynamic"; or rebuild app every time there is a new entry to the database...

eterr
Автор

so when we use ssg, we can refresh our data with ISR . BUt when we use SSR, how can we refresh our ssr data ?

ThanHtutZaw
Автор

Good lesson, but in the client side fetch example, react is asking for name to be added to the use Effect array as a dependency, and when such is done there is an indefinite re-render. How can one avoid this?

ambrosebeavers
Автор

this is the first time I understood ISR

wchorski
Автор

This is very useful, but the ui and the example is not impressive at all, if you want viewers to stay in this channel you shoule do better than this 😅😑🙄🤔

maskman