Async Await Fetch Data from API in React JS (Multiple Ways)

preview_player
Показать описание
Lets fetch some data from live api by using fetch with async await in multiple ways in react js. Also we are using hooks (useState and useEffect). You can use FETCH with or without async/await.

Full Playlists:

ReactJS Playground

JavaScript Problem Solving:

Web Development Essentials:

Crash Courses:

Give this video a LIKE
SUBSCRIBE to Channel if you haven't already
Hit BELL icon to receive updates
Share your thoughts in comments
Share our videos on social media platforms
Give us feedback
Follow us on social media

Tell us what should we cover for you.
Ask programming, web development, software engineering, frameworks related questions.
Thanks for watching!
Stay tuned!

#async #await #fetch #reactjs #react #javascript #javascripttutorial #webdevelopment #webstylepress
Рекомендации по теме
Комментарии
Автор

To watch more related videos, please LIKE, SHARE & SUBSCRIBE! WebStylePress needs your support.

webstylepress
Автор

Thank you so much for such a knowledgeable video

jyothijadoun
Автор

Thanks for this video, it was really easy-to-use and user friendly. Great job

simonetrita
Автор

You mentioned it in your video, but I don't think the async await in your loadData function does anything - it just adds unnecessary stuff, and I don't think doing both is better or best practice. I think it's best practice to either use .then() syntax or async /await.

The way the loadData is written with both, it's like adding async await to a synchronous function since .then() already handles the async fetch. Ex:
let x = 0;
const addOne = async () =>{
await x++;
}

Feel free to correct me if I'm wrong.

Thanks for your video!

williamx
Автор

Good video man, i like how u use different approaches so we can choose, keep it up!

RealRurik
Автор

thank you very much, really appreciate

tranong
Автор

Thank you so much, you are a master!!!!

diegomurillo
Автор

Today, to work, the map function needs a return value. So it's going like that :
data.map(record
})}

yanntrad
Автор

I using same fetch api but at first render it doesn’t getting data in useSate constant veritable, saying .map undefined, please tell why is that

GurjeetSingh-iujo
Автор

Seems a ASMR video!! Hahah great content, congratulations!

FrigoDruid
Автор

How to avoid empty array fetching initially, and tell me solution to fetch data without an empty array

nithyasreeraj
Автор

You have given very less explanation. Please explain more in next videos.

ankitaghadge.
Автор

In map record is not defined . Why bro?

CEFPRAVEENS
Автор

how can I fetch data from local json file instead of URL?

vasilikiphant
welcome to shbcf.ru