We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React will issue a warning in dev if you try to use pass innerHTML prop to a DOM element tag.
innerHTML
https://github.com/facebook/react/blob/85dcbf83/src/renderers/dom/shared/ReactDOMComponent.js#L182-L184
This should be easy enough to enforce for most cases with a linter rule.
Bad:
<div innerHTML='HTML' />
Good:
<div dangerouslySetInnerHTML={{ __html: 'HTML' }} />
The text was updated successfully, but these errors were encountered:
Name: dom-elements-no-inner-html?
dom-elements-no-inner-html
Sorry, something went wrong.
No branches or pull requests
React will issue a warning in dev if you try to use pass
innerHTML
prop to a DOM element tag.https://github.com/facebook/react/blob/85dcbf83/src/renderers/dom/shared/ReactDOMComponent.js#L182-L184
This should be easy enough to enforce for most cases with a linter rule.
Bad:
Good:
The text was updated successfully, but these errors were encountered: