How to correctly replace type any when returning children or map of children if array

前端 未结 0 547
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 01:22

I have a React function component that checks if children is an array. If it is not an array then it returns it. Otherwise it maps over the children and returns some JSX.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题