I am a beginner in React. I am using the json placeholder to fetch data using axios. I have two arrays in the state.
state = {
posts : [],
images : []
};
After getting the data through axios I am using set state up update the value. Now, I want it all displayed in a card. If it were just one array I would've used map to display the content. Now I want an image from the images array to be displayed with each post. How could I go about this?
posts.map((item, index)=> {const image = images[index]; ...})