Skip to content
loading...

re: How to make many http requests with react VIEW POST

FULL DISCUSSION
 

if you have multiple callback asynchrous update the setState, you should consider this method to make sure they don't overwrite each other or race conditions:

this.setState( prevState => ({ ...prevState, work1: result });

this.setState( prevState => ({ ...prevState, work2: result });

code of conduct - report abuse