Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

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.

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.
@sebmarkbage sebmarkbage requested a review from gaearon June 14, 2021 20:44
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jun 14, 2021
@sizebot
Copy link

sizebot commented Jun 14, 2021

Comparing: dbe3363...5ef310a

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 127.08 kB 127.08 kB = 40.74 kB 40.74 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 129.89 kB 129.89 kB = 41.67 kB 41.67 kB
facebook-www/ReactDOM-prod.classic.js = 405.00 kB 405.00 kB = 74.93 kB 74.93 kB
facebook-www/ReactDOM-prod.modern.js = 393.35 kB 393.35 kB = 73.11 kB 73.11 kB
facebook-www/ReactDOMForked-prod.classic.js = 405.00 kB 405.00 kB = 74.93 kB 74.93 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-dom/umd/react-dom-server.browser.production.min.js +0.44% 32.29 kB 32.43 kB +0.48% 10.75 kB 10.80 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.production.min.js +0.44% 32.11 kB 32.25 kB +0.45% 10.61 kB 10.66 kB
oss-stable-semver/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js +0.40% 32.12 kB 32.25 kB +0.52% 10.83 kB 10.88 kB
oss-stable/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js +0.40% 32.12 kB 32.25 kB +0.52% 10.83 kB 10.88 kB
oss-experimental/react-dom/cjs/react-dom-unstable-fizz.browser.production.min.js +0.40% 32.24 kB 32.37 kB +0.56% 10.87 kB 10.93 kB
oss-stable-semver/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js +0.40% 32.40 kB 32.53 kB +0.54% 10.83 kB 10.89 kB
oss-stable/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js +0.40% 32.40 kB 32.53 kB +0.54% 10.83 kB 10.89 kB
oss-experimental/react-dom/cjs/react-dom-unstable-fizz.node.production.min.js +0.39% 32.53 kB 32.65 kB +0.54% 10.87 kB 10.93 kB
oss-stable-semver/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js +0.38% 32.29 kB 32.41 kB +0.45% 10.95 kB 11.00 kB
oss-stable/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js +0.38% 32.29 kB 32.41 kB +0.45% 10.95 kB 11.00 kB
oss-experimental/react-dom/umd/react-dom-unstable-fizz.browser.production.min.js +0.38% 32.41 kB 32.54 kB +0.44% 11.00 kB 11.05 kB
facebook-www/ReactDOMServer-dev.modern.js +0.38% 217.13 kB 217.96 kB +0.39% 50.91 kB 51.11 kB
oss-stable-semver/react-dom/cjs/react-dom-unstable-fizz.node.development.js +0.37% 214.54 kB 215.35 kB +0.35% 51.26 kB 51.44 kB
oss-stable/react-dom/cjs/react-dom-unstable-fizz.node.development.js +0.37% 214.54 kB 215.35 kB +0.35% 51.26 kB 51.44 kB
oss-stable-semver/react-dom/cjs/react-dom-unstable-fizz.browser.development.js +0.37% 214.76 kB 215.57 kB +0.35% 51.43 kB 51.61 kB
oss-stable/react-dom/cjs/react-dom-unstable-fizz.browser.development.js +0.37% 214.76 kB 215.57 kB +0.35% 51.43 kB 51.61 kB
oss-experimental/react-dom/cjs/react-dom-unstable-fizz.node.development.js +0.37% 215.10 kB 215.91 kB +0.35% 51.43 kB 51.61 kB
oss-experimental/react-dom/cjs/react-dom-unstable-fizz.browser.development.js +0.37% 215.32 kB 216.13 kB +0.35% 51.59 kB 51.77 kB
oss-stable-semver/react-dom/umd/react-dom-unstable-fizz.browser.development.js +0.37% 225.68 kB 226.52 kB +0.40% 52.01 kB 52.22 kB
oss-stable/react-dom/umd/react-dom-unstable-fizz.browser.development.js +0.37% 225.68 kB 226.52 kB +0.40% 52.01 kB 52.22 kB
oss-experimental/react-dom/umd/react-dom-unstable-fizz.browser.development.js +0.37% 226.29 kB 227.13 kB +0.40% 52.16 kB 52.37 kB
facebook-www/ReactDOMServer-prod.modern.js +0.35% 72.61 kB 72.87 kB +0.36% 14.93 kB 14.98 kB
oss-experimental/react-dom/umd/react-dom-server.browser.development.js +0.33% 229.22 kB 229.98 kB +0.35% 52.58 kB 52.76 kB
oss-experimental/react-dom/cjs/react-dom-server.browser.development.js +0.33% 218.09 kB 218.81 kB +0.32% 52.00 kB 52.16 kB
oss-stable-semver/react-dom/cjs/react-dom-server.node.development.js +0.32% 219.09 kB 219.81 kB +0.32% 52.26 kB 52.42 kB
oss-stable/react-dom/cjs/react-dom-server.node.development.js +0.32% 219.09 kB 219.81 kB +0.32% 52.26 kB 52.42 kB
oss-experimental/react-dom/cjs/react-dom-server.node.development.js +0.32% 219.67 kB 220.38 kB +0.32% 52.43 kB 52.60 kB

Generated by 🚫 dangerJS against 5ef310a

Copy link
Collaborator

@gaearon gaearon left a 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(
Copy link
Collaborator

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

@sebmarkbage sebmarkbage merged commit bd45ad0 into facebook:master Jun 14, 2021
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
…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.
kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request Nov 17, 2021
React-dom renders doctype automatically when `<html>` is detected. We should append `DOCTYPE` prefix only when necessary.
x-ref: facebook/react#21680

## Bug

![image](https://user-images.githubusercontent.com/4800338/142215292-4af4a61d-2d75-48ae-a31a-0af641c72dcf.png)

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
React-dom renders doctype automatically when `<html>` is detected. We should append `DOCTYPE` prefix only when necessary.
x-ref: facebook/react#21680

## Bug

![image](https://user-images.githubusercontent.com/4800338/142215292-4af4a61d-2d75-48ae-a31a-0af641c72dcf.png)

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants