Search code examples
facebookreactjspolymerweb-component

Custom attributes in React


"If you pass properties to native HTML elements that do not exist in the HTML specification, React will not render them." - React docs. https://facebook.github.io/react/docs/jsx-gotchas.html#custom-html-attributes

Is there performance issues or why aren't custom attributes rendered in React?


Solution

  • Because React designed to not pass any data to html attributes, only store data in the state or props of component.