开发者社区 问答 正文

React中,不推荐使用props.children.map(()=>),是为什么呢?

React中,不推荐使用props.children.map(()=>),是为什么呢?

展开
收起
小赵赵赵赵 2021-11-22 19:01:47 574 分享 版权
1 条回答
写回答
取消 提交回答
  • 因为不能保证props.children是一个数组 如果只有一个族元素,props.children是一个对象 有多个元素,props.children是一个数组

    它免费提供了丰富全面的教程,并且进行了非常详细的分类: https://developer.aliyun.com/graph/frontend

    2021-11-22 21:14:18
    赞同 展开评论
问答分类:
问答地址: