I have these codes
import React, { Component } from 'react'
import './RightContent.css'
class RightContent extends Component {
render() {
const albumdata = this.props.albumdata;
const albumthumbnail = this.props.albumthumbnail;
return (
<div class="content2">
{albumthumbnail.map(data => (
<div class="albumcontainer">
<div class="albumitem">
<img src={data.url}></img>
<div class="description">{data.title}</div>
</div>
</div>
))}
</div>
);
}
The problem is that I would to make a loop of album item with image and title, the albumdata contains titles of the albums, while albumthumbnail holds the first image of the album, but I can't do the map below the albumthumbnail.map .
I would like to make a loop in div to display albums with details coming from two arrays of objects. But it seems impossible.