True custom attributes (e.g. Microdata) in React

后端 未结 5 1797
渐次进展
渐次进展 2020-12-09 16:57

The site I am developing makes use of Microdata (using schema.org). As we are shifting development over to use React to render our views I have hit a blocker where React wil

5条回答
  •  感动是毒
    2020-12-09 17:18

    You can also use "is" attribute. It will disable the attribute white-list of React and allow every attribute. But you have to write class instead of className and for instead of htmlFor if you use is.

    Update React 16 custom attributes are now possible

    In react 16 custom attributes are now possible

    React 16 custom attributes

提交回复
热议问题