I'm not sure why I never realized this, but it makes sense.
JSX doesn't treat new lines in text the same way that the browser interprets them in HTML text content
It's just interesting, in HTML the outcomes below would be the same.
JSX doesn't treat new lines in text the same way that the browser interprets them in HTML text content
It's just interesting, in HTML the outcomes below would be the same.
1 / 2
Comments
This kind of bug (and there are loads more, especially around self closing tags) is why I stopped working with JSX in general though.