React报警告,warning: React does not recognize the `subTitle` prop on a DOM element.

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

1.原因: 不要将组件的属性, 传给DOM节点。


2.修改方法:

     将

或其他html标签,非其属性去掉。

react语法不喜欢冗余的写法。

React报警告,warning: React does not recognize the `subTitle` prop on a DOM element._第1张图片

你可能感兴趣的:(React)