How to Do Multiple API Requests In ReactJS | 2020

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Hey y'all so the nba api to get pictures doesn't seem to be working anymore you can use any other api for the tutorial instead
this one can help but there is not pictures available for players

arslan
Автор

Thanks Man, I was having problems with Rendering, Reactjs does twice or three times the rendering if I added the axios by separate in same file and this tutorial got resolved. Way to go!!!

maxivin
Автор

6:10 "Ladies and gentlemen, boys and girls, turtles of all ages, we got the DATA!" hahahahaha

surdmlb
Автор

Arslan! You are a LEGEND! Just know that you saved a life over here.

eddpalenciavanegas
Автор

Thank you so much! You are amazing. I always look through dozens of videos and when I get to yours it explains it simple and correct.

zoranpujic
Автор

Thank you so much Arslan. Ppl like you make survival easy.

rootcause
Автор

It would be helpful to zoom in a bit to make it easier to read :)

Royale
Автор

Great Tutorial! after searching a lot finally found a useful one.

deepanshigupta
Автор

Thank you so much dude...this was a much needed video

chinmaykulkarni
Автор

Nice video <3

I was looking for a quick and dirty method for pulling data from multiple API endpoints. I'm working on a ReactJS + WordPress REST API project (website) to finish and launch to start working on my real projects. I wanted to call a blog title from blog endpoint and posts content from posts endpoint respectively! I know this is a more manual method but it works great. I call the data for each API endpoint once now, console.log it so I have verified it works and data renders.

Thanks for the great and simple tutorial, next I'll look to learn how to map over an array of REST API endpoints so I can do it more eloquently and pull more data efficiently!

TheSoulCrisis
Автор

Thanks for the awsome video, now i can use axios.all for multiple fetch calls, it is a great video. and i am sharing ur video in udemy course as the lecturer didnt do this and this is the correct video.
I also request you to make a video with promise.all for reactjs
FINALLY SUPERB VIDEO.

rohandevaki
Автор

I'm new to APIs. Where do you add the headers, I tried adding it but seems not to work

ubahobaah
Автор

Hey... I know this is old. I wanted to ask why you didn't add the Asyn/await keyword in your function.

udochiop
Автор

I’m struggling with my code. I need to pull modified date from one API, compare date to current date. If more than 24 hours retrieve data from a graphQL and then update the original API.

What’s the best approach for this?

shannoncole
Автор

super helpful! no other tutorials for this on youtube. if i wanted to a connect data from two apis, i guess i'd do conditionals right? "if data1 === data2, render that"
since i see you've used explicit urls of lebron

dudecool
Автор

How can we make subsequent API calls which needs an API key as well ?

i_mchick
Автор

Do you know how I can map over 2 arrays in React and return a certain image to the element from that array, for example one card must show 6 images and the next card only 2 and so on...please help

claytonvanderhaar
Автор

Nice job, thanks for putting this together. Have you thought about how you could make the fetchData function reusable?

nicholasbernard
Автор

Hello Arslan, great tutorial, thanks ! Currently I'm searching for solution with spinner and error in multiple data fetching. Could you point out something clever ?

marekj
Автор

I tried the same but each of the values are getting fetched twice in the console..can u hlp why is this getting caused?

namratadas