How to Do Multiple API Requests In ReactJS | 2020

How to Do Multiple API Requests In ReactJS | 2020

Arslan

4 года назад

72,008 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

The Soul Crisis
The Soul Crisis - 19.04.2023 03:34

Nice video brotha...... <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!

Ответить
Emre Şimşekk
Emre Şimşekk - 21.03.2023 22:53

thanks...

Ответить
Eggside
Eggside - 12.02.2023 18:17

aw man I was expecting you to map them

Ответить
Bulut Yelken
Bulut Yelken - 09.02.2023 04:20

thank you bro sağol

Ответить
netsaosa
netsaosa - 24.01.2023 07:36

Lebron James

Ответить
Root Cause
Root Cause - 17.01.2023 14:32

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

Ответить
I_MCHICK
I_MCHICK - 16.12.2022 14:56

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

Ответить
Ubah Obaah
Ubah Obaah - 10.12.2022 21:40

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

Ответить
Zoran Pujić
Zoran Pujić - 15.11.2022 18:29

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.

Ответить
Deepanshi Gupta
Deepanshi Gupta - 08.11.2022 11:04

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

Ответить
Namrata Das
Namrata Das - 08.09.2022 15:05

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

Ответить
Clayton van der Haar
Clayton van der Haar - 07.09.2022 11:16

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

Ответить
Clayton van der Haar
Clayton van der Haar - 06.09.2022 20:01

GREAT

Ответить
Mohit Kumar
Mohit Kumar - 10.08.2022 19:33

Thanks Sir ji😍😍😍😍😍😍

Ответить
Known Technical
Known Technical - 27.07.2022 15:47

Awesome stuff

Ответить
Tokyo •13 years and
Tokyo •13 years and - 26.06.2022 19:34

Bro You got a sub because you said "turtle 🐢 of ages🙂" jk it was helpful

Ответить
abeechr
abeechr - 15.06.2022 17:19

Thank you so much!

Ответить