React: check if props undefined

后端 未结 0 723
-上瘾入骨i
-上瘾入骨i 2020-12-07 03:22

I want to do some things in componentDidUpdate if a prop is undefined, however, I can\'t because I just get the error Cannot read property \'serial\' of undefined.

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