Open jamesarosen opened 1 month ago
tbh this seems like just a bug in React to me - i'm not sure why they can't just omit the comments for <title>
, presumably at the insignificant cost of making updates to that element slower or more frequent.
I agree, but the React team knows about it and doesn't want to fix it.
This issue describes a common problem that has an easy but non-obvious solution.
<title>
as literal text.Putting (1) and (2) together means that this normal-seeming JSX is broken:
react-dom emits a warning:
I propose a rule that allows static text or an interpolation, but not both as the child of
<title>
.