The map() method creates a new array populated with the results of calling a provided function on every element in the calling array.
.map() in JavaScript iterates through an array and calls a specified function for each of the items. Components in JSX are JS functions. For each object in the array, a block of JSX elements is returned.
Also, data from the object is passed to each block using the JSX handlebars-like curly brackets.
In the App() component of src/index.js iterate over the imported data using .map()
The spread operator is a useful and quick syntax for adding items to arrays, combining arrays or objects, and spreading an array out into a function’s arguments.
JavaScript, spread syntax refers to the use of an ellipsis of three dots (…) to expand an iterable object into the list of arguments.
The … spread operator is useful for many different routine tasks in JavaScript, including the following:
- Copying an array
- Concatenating or combining arrays
- Using Math functions
- Using an array as arguments
- Adding an item to a list
- Adding to state in React
- Combining objects
- Converting NodeList to an array
For More Info How to Pass Functions between Components
i want to know more about using map in the react and we can can get use it in real web app .

