Pasar datos por el estado

De enunpimpam
Saltar a: navegación, buscar
class Album extends React.Component {
  state = {
   data: [{
    imgUrl:"https://images-assets.nasa.gov/image/PIA03240/PIA03240~thumb.jpg",
    nasa_id: "PIA03240",
    keywords: "Mars,Mars Exploration Rover MER",
    description:"Synthetic image of the Opportunity Mars Exploration Rover inside  produced using Virtual Presence in Space technology.",
},],};
render() {
  return (
     <ul>
     {this.state.data.map(foto => {
      return (
        <li  key={foto.nasa_id}><p>{foto.keywords}</p></li>);
     })}
    </ul>
);
}}
export default Album;