You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[`no-void-elements-with-children`](./dom-no-void-elements-with-children)| 2️⃣ |`🔍`| Prevents using `children` in void `DOM elements`.|
86
-
|[`no-dangerously-set-innerhtml-with-children`](./dom-no-dangerously-set-innerhtml-with-children)| 2️⃣ |`🔍`| Prevents DOM element using `dangerouslySetInnerHTML` and `children` at the same time. |
87
-
|[`no-dangerously-set-innerhtml`](./dom-no-dangerously-set-innerhtml)| 1️⃣ |`🔍`| Prevents DOM element using `dangerouslySetInnerHTML`. |
88
-
|[`no-find-dom-node`](./dom-no-find-dom-node)| 2️⃣ |`🔍`| Prevents using `findDOMNode`. |
|[`no-namespace`](./dom-no-namespace)| 2️⃣ |`🔍`| Enforces the absence of a `namespace` in React elements. |
92
-
|[`no-render-return-value`](./dom-no-render-return-value)| 2️⃣ |`🔍`| Prevents using the return value of `ReactDOM.render`. |
93
-
|[`no-script-url`](./dom-no-script-url)| 1️⃣ |`🔍`| Prevents using `javascript:` URLs as the value of attributes. |
94
-
|[`no-unknown-property`](./dom-no-unknown-property)| 0️⃣ |`🔍``🔧``⚙️`| Prevents using unknown `DOM` property |
95
-
|[`no-unsafe-iframe-sandbox`](./dom-no-unsafe-iframe-sandbox)| 1️⃣ |`🔍`| Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations. |
96
-
|[`no-unsafe-target-blank`](./dom-no-unsafe-target-blank)| 1️⃣ |`🔍`| Prevents using `target="_blank"` without `rel="noreferrer noopener"`. |
|[`no-void-elements-with-children`](./dom-no-void-elements-with-children)| 2️⃣ |`🔍`| Prevents using `children` in void DOM elements. |
86
+
|[`no-dangerously-set-innerhtml-with-children`](./dom-no-dangerously-set-innerhtml-with-children)| 2️⃣ |`🔍`| Prevents DOM elements using `dangerouslySetInnerHTML` and `children` at the same time. |
87
+
|[`no-dangerously-set-innerhtml`](./dom-no-dangerously-set-innerhtml)| 1️⃣ |`🔍`| Prevents DOM elements using `dangerouslySetInnerHTML`. |
88
+
|[`no-find-dom-node`](./dom-no-find-dom-node)| 2️⃣ |`🔍`| Prevents using `findDOMNode`. |
|[`no-namespace`](./dom-no-namespace)| 2️⃣ |`🔍`| Enforces the absence of a `namespace` in React elements. |
92
+
|[`no-render-return-value`](./dom-no-render-return-value)| 2️⃣ |`🔍`| Prevents using the return value of `ReactDOM.render`. |
93
+
|[`no-script-url`](./dom-no-script-url)| 1️⃣ |`🔍`| Prevents using `javascript:` URLs as the value of attributes. |
94
+
|[`no-unknown-property`](./dom-no-unknown-property)| 0️⃣ |`🔍``🔧``⚙️`| Prevents using unknown `DOM` property |
95
+
|[`no-unsafe-iframe-sandbox`](./dom-no-unsafe-iframe-sandbox)| 1️⃣ |`🔍`| Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations. |
96
+
|[`no-unsafe-target-blank`](./dom-no-unsafe-target-blank)| 1️⃣ |`🔍`| Prevents using `target="_blank"` without `rel="noreferrer noopener"`. |
Disallows DOM element using `children` and `dangerouslySetInnerHTML` at the same time.
30
+
Disallows DOM elements using `children` and `dangerouslySetInnerHTML` at the same time.
31
31
32
32
When using `dangerouslySetInnerHTML`, the content of the DOM element is set from the `__html` property. The content of the DOM element is completely replaced, so the children will not be rendered as expected.
Prevents the use of `children` in void `DOM elements`.
30
+
Prevents the use of `children` in void DOM elements.
31
31
32
32
Self-closing HTML elements (e.g. `<img />`, `<br />`, `<hr />`) are collectively known as void DOM elements. React will give you a warning if you try to give these children:
0 commit comments