I am building a Film grid that should return their Id, thumbnail, title, episode number and released date.
How can a map these values of Swapi? (Thumbnails are in img folder)
ListFilms.js Component:
import React, { Component } from "react";
class ListFilms extends Component {
render() {
const films = this.props.films;
console.log(films);
return (
<div className="row">
<table className="table table-dark">
<thead>
<tr>
<th scope="col">Id</th>
<th scope="col">Thumbnail</th>
<th scope="col">Film Title</th>
<th scope="col">Released Date</th>
<th scope="col">Episode Number</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">{films.id}</th>
<td>
<img src={} alt={}>
</td>
<td>{films.title}</td>
<td>{films.created}</td>
<td>{films.episode_id}</td>
</tr>
</tbody>
</table>
</div>
);
}
}
export default ListFilms;