我有以下渲染方法:使用ARIA属性
render: function() {
return (
React.createElement('div', {className: 'modal', id: 'errorModal', tabIndex: '-1', role: 'dialog', ariaHidden: 'true', dataBackdrop: 'false', style: {marginTop: '30px'}}, 'text')
)
}
这给了我错误:
react.js:20541 Warning: Unknown props
ariaHidden
,dataBackdrop
on tag. Remove these props from the element. For details, see in div (created by Constructor) in Constructor
我怎么能解决这个问题?文档说我可以使用这些属性。小写字母也不起作用。我不想使用jsx。
试''咏叹调-hidden''代替'ariaHidden' –
同样使用'数据backdrop'代替'dataBackdrop '。数据属性必须以React的'data-'前缀开始传递。 –
对于React发出对复合支柱名称的警告似乎是不礼貌的,并且在其他情况下警告反对骆驼套的道具名称!为什么不一致,需要ariaHidden等? – pwray