-
Notifications
You must be signed in to change notification settings - Fork 50k
Add a DOCTYPE to the stream if the <html> tag is rendered at the root #21680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This makes it a lot easier to render the whole document using React without needing to patch into the stream. We expect that currently people will still have to patch into the stream to do advanced things but eventually the goal is that you shouldn't need to.
|
Comparing: dbe3363...5ef310a Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
gaearon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful
| ); | ||
| startWriting(); | ||
| jest.runAllTimers(); | ||
| expect(output.result).toMatchInlineSnapshot( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fancy, I forgot this already works
…1680) This makes it a lot easier to render the whole document using React without needing to patch into the stream. We expect that currently people will still have to patch into the stream to do advanced things but eventually the goal is that you shouldn't need to.
React-dom renders doctype automatically when `<html>` is detected. We should append `DOCTYPE` prefix only when necessary. x-ref: facebook/react#21680 ## Bug  - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
React-dom renders doctype automatically when `<html>` is detected. We should append `DOCTYPE` prefix only when necessary. x-ref: facebook/react#21680 ## Bug  - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md`
This makes it a lot easier to render the whole document using React without needing to patch into the stream.
We expect that currently people will still have to patch into the stream to do advanced things but eventually the goal is that you shouldn't need to once we have enough escape hatches to inject into the stream.
I couldn't update the
/ssr2/fixture yet since that installs a public version rather than installs React from source builds.