1const todoItems = todos.map((todo) =>
2 <li key={todo.id}> {todo.text}
3 </li>
4);
1const App = props => {
2 const quoteArray = props.quotes.map((quote) => {
3 return (
4 <Quote text={quote.text} author={quote.author} />
5 );
6 });
7 return (
8 <div>
9 <h2>Famous Quotes</h2>
10 {quoteArray}
11 </div>
12 );
13};
14App.propTypes = {
15 quotes: React.PropTypes.array
16}