Uploaded by jami

Law and scholl (1)

advertisement
Compiled with warnings.
[eslint]
src/App.js
Line 12:35: Array.prototype.map() expects a return value from arrow function
array-callback-return
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
WARNING in [eslint]
src/App.js
Line 12:35: Array.prototype.map() expects a return value from arrow function
array-callback-return
function App() {
const list= [
{id:1, name: 'item1'},
{id:2, name: 'item2'},
{id:3, name: 'item3'},
{id:4, name: 'item4'},
]
const listContent = list.map(item =>{
<li key={item.id}>{item.name}</li>
})
return(
<ul>{listContent}</ul>
)
}
export default App;
Download