Is there a way in React to change a prop type to avoid TypeErrors?

前端 未结 0 1694
旧巷少年郎
旧巷少年郎 2021-02-20 02:34

I\'m wondering if there\'s a way to change a prop type if the one that is being passed isn\'t of the type expected.

For example, if my component expects to receive an obj

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