React and HTML handle a bit differently when text nodes and the next element have a line break between them. HTML may add an extra whitespace. It even seems prettier also accounts for this since it also adds whitespaces sometimes when reformatting.
This allows for small possible layout differences between the original HTML and the generated JSX. For an "accurate" conversion, {" "}s or s should be added on some cases.
https://github.com/facebook/react/issues/1643
React and HTML handle a bit differently when text nodes and the next element have a line break between them. HTML may add an extra whitespace. It even seems prettier also accounts for this since it also adds whitespaces sometimes when reformatting.
This allows for small possible layout differences between the original HTML and the generated JSX. For an "accurate" conversion,
{" "}
s or
s should be added on some cases.