Home Async API calls in react
Reply: 0

Async API calls in react

Sean Wade
Sean Wade Published in 2018-02-12 15:39:16Z

I have a react component and on the componentDidMount method I call the following function callApi.

However, when the parent component creates many of these it loads one at a time. Bellow is the devtools and you can see it is staggered.

My question is if this function is async why do they load one at a time? I tried logging the componentDidMount start and end and those all finished before callApi on all of the components, so it is not waiting there... Any help or ideas would be appreciated!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.38597 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO