【发布时间】:2021-08-12 20:12:56
【问题描述】:
我得到了道具数组“标签”
我想使用 JSX 和 array.map() 渲染这个数组
{/* [undefined, undefined, ... ] */}
{tags.map((tag) => {
console.log(tag.tag); // it's okay. printed well tag.tag
<p1>{tag.tag}</p1> // it's not okay. tag.tag is undefined.
})}
{/* it's okay */}
<p1>{tags[0].tag}</p1>
什么问题..? T_T
【问题讨论】: