react icon indicating copy to clipboard operation
react copied to clipboard

Bring back the "JSX Gotchas" doc

Open nylen opened this issue 9 years ago • 2 comments

The following document was very useful: https://github.com/facebook/react/blob/v15.4.0-rc.3/docs/docs/02.3-jsx-gotchas.md#html-entities

However, it seems to have disappeared entirely in #7878 and v15.4.0, with no replacement.

I can't find anywhere in the current documentation that explains how and why React escapes HTML passed in by default. I was trying to explain this to someone today, and right now, it seems like this is something you "just have to know".

The other section about custom HTML attributes seems useful too.

nylen avatar Feb 14 '17 07:02 nylen

Thank you for helping me out and creating this. This will potentially save lots of time for the beginners!

ohsik avatar Feb 14 '17 08:02 ohsik

It is mentioned here I think? https://facebook.github.io/react/docs/jsx-in-depth.html#string-literals

Feel free to contribute if you think something is missing.

gaearon avatar Feb 14 '17 12:02 gaearon