- base::
解析数组
const products = [ { title: 'Cabbage', id: 1 }, { title: 'Garlic', id: 2 }, { title: 'Apple', id: 3 }, ];Inside your component, use the map() function to transform an array of products into an array of
<li>items: 指向原始笔记的链接const listItems = products.map(product => <li key={product.id}> {product.title} </li> ); return ( <ul>{listItems}</ul> ); - 与vue一样,需要一个Vue key属性
- it should be considered a different
Chatcomponent that needs to be re-created
- it should be considered a different