this.props.children throws error ‘children’ is missing in props validation
eslint的rules
中添加如下忽略即可
"react/prop-types": [2, { ignore: ['children'] }],
如果您觉得本文对您有用,欢迎捐赠或留言~
- 本博客所有文章除特别声明外,均可转载和分享,转载请注明出处!
- 本文地址:https://www.leevii.com/?p=2324
eslint的rules
中添加如下忽略即可
"react/prop-types": [2, { ignore: ['children'] }],