I have discussed this particular sentence with a colleague:
By default, React DOM escapes any values embedded in JSX before rendering them. Thus it ensures that you can never inject anything that’s not explicitly written in your application. Everything is converted to a string before being rendered.
https://reactjs.org/docs/introducing-jsx.html#jsx-prevents-injection-attacks
Specific these two quotes: "React DOM escapes any values embedded in JSX before rendering them" and "Everything is converted to a string before being rendered"
As far as we know, everything is assigned via a Text-node and not escaped as the first sentence describes.
Mimicked example
const test = `<script>console.log("My log")</script>`;
let body = document.querySelector('body');
let content = new Text(test);
body.appendChild(content);
I have discussed this particular sentence with a colleague:
https://reactjs.org/docs/introducing-jsx.html#jsx-prevents-injection-attacks
Specific these two quotes: "React DOM escapes any values embedded in JSX before rendering them" and "Everything is converted to a string before being rendered"
As far as we know, everything is assigned via a Text-node and not escaped as the first sentence describes.
Mimicked example