.map is ES6 feature and used with array; it returns a new array with the results of calling a function for every array element.
Result:
'key' attribute is used to uniquely identify elements.
Example:
import React from 'react';
const names = ['John', 'Doe', 'Jenny', 'Marie'];
function App() {
return (
<div className="App">
<ul>
{names.map(function(name, index){
return <li key={ index }>{name}</li>;
})}
</ul>
</div>
);
}
export default App;
Result:
Valuable post useful for everyone.Keep on sharing.
ReplyDeleteReact JS Online training
React JS training in hyderabad
Great Article The IEEE Xplore digital library is your gateway to trusted research—journals, conferences, standards, ebooks, and educational courses—with more than 3 million articles to help you fuel imagination, build from previous research, and inspire new ideas. Node Js Projects for Final Year IEEE will pave a new way in knowledge-sharing and spreading ideas across the globe. Project Centers in Chennai for CSE Node.js Corporate Training JavaScript Training in Chennai
ReplyDeleteIncredible tips and straightforward. This will be exceptionally helpful for me when I get an opportunity to begin my blog.
ReplyDeletenodejs software developers