There are many JavaScript array methods.
One of the most useful in React is the .map()
array method.
The .map()
method allows you to run a function on each item in the array, returning a new array as the result.
In React, map()
can be used to generate lists.
Generate a list of items from an array:
const myArray = ['apple', 'banana', 'orange'];
const myList = myArray.map((item) => <p>{item}</p>)
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!