其他分享
首页 > 其他分享> > React自定义组件参数小驼峰命名提示警告 Warning: React does not recognize the `xxXxx` prop on a DOM element.

React自定义组件参数小驼峰命名提示警告 Warning: React does not recognize the `xxXxx` prop on a DOM element.

作者:互联网

Warning: React does not recognize the `xxXxx` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `xxxxx` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

警告:React无法识别DOM元素上的“xxXxx”属性。如果您有意将其作为自定义属性显示在DOM中,请将其拼写为小写字母“xxxxx”。如果您意外地从父组件传递了它,请将其从DOM元素中删除。

 

 解决方案:https://zh-hans.reactjs.org/warnings/unknown-prop.html

 

标签:自定义,DOM,element,React,prop,xxXxx
来源: https://www.cnblogs.com/Blogzlj/p/16592134.html