Can't access values for Axios calls in map loop
问题 I have a javascript object with the IDs corresponding to a set of galleries. I loop through it using map. On each loop, I make an axios call to get the gallery for the current id. In the end, I need to have an array with all the galleries content. The problem is I can't access the data after the map loop is done. I see all the data when I console.log(galleries) but not when I do console.log(galleries[0].gallery). I suspect this has to be with the async calls. I'm new to react so I'm might be