import React from 'react';
const stories = [ { title: 'React', url: 'https://react.js.org/', author: 'Jordan Walke', num_comments: 3, points: 4, objectId: 0, }, { title: 'Redux', url: 'https://redux.js.org/', author: 'Dan Abramov, Andrew Clark', num_comments: 2, points: 5, objectId: 1, }, ];
const App = () => { return (
My React
<label htmlFor="search">Search: </label>
<input id="search" type="text" />
<hr />
<list />
</div>
); };
const List = () => { return stories.map(item => { return ( {item.title} {item.author} {item.num_comments} {item.points} ); }); };
export default App; // export default App;
Aucun commentaire:
Enregistrer un commentaire