How to fetch data from an API in ReactJS or NextJS

Published: 30 November 2021
on channel: Mafia Codes
8,748
178

In this video you will learn how the #useSWR hook from #SWR (stale while revalidate) library by #Vercel for #data fetching in #ReactJS or #NextJS. You will also learn about other benefits of using this library, like revalidation, refetching data, how to use the #mutate function to revalidate data.

--------------------------------------------------------------------------
📦FREE $100 credit @Digital Ocean: https://m.do.co/c/3208f08b3324
--------------------------------------------------------------------------
Subscribe: https://www.youtube.com/c/yourstruly2...
--------------------------------------------------------------------------
💵Support the channel:
Paypal: https://www.paypal.me/trulymittal
Patreon:   / trulymittal  
--------------------------------------------------------------------------
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! https://www.kite.com/get-kite/?utm_me...
--------------------------------------------------------------------------

Introduction 0:00
Installation 00:58
UserComponent 2:25
useSWR 3:47
Fetcher function 5:00
Options 10:48
Revalidate on focus 11:54
Refresh interval 13:10
Mutate function 15:34
Conditionally fetch data 18:43
SWRConfig 27:44

https://swr.vercel.app/

======================
✔ Other useful Playlists
======================
#RestAPI (#NodeJS and MongoDB):    • REST API using NodeJS and MongoDB  
#API Authentication using #JWT:    • NodeJS API Authentication (JWT's)  
#Firebase:    • Firebase | Build a Notes App  
Docker:    • Docker  
MongoDB:    • Learn MongoDB in 50 minutes (Crash Co...  
Html/Css/Js:    • HTML / CSS / JS  
Android:    • Android  
Challenges:    • Challenges  

#yoursTRULY #tutorial #howto #nodejs #android


Watch video How to fetch data from an API in ReactJS or NextJS online without registration, duration hours minute second in high quality. This video was added by user Mafia Codes 30 November 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 8,748 once and liked it 178 people.