-
Notifications
You must be signed in to change notification settings - Fork 46.4k
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
[Fizz] New Server Rendering Infra #14144
Merged
Merged
Commits on Nov 30, 2018
-
[Fizz] Add Flow/Jest/Rollup build infra
Add a new package for react-stream which allows for custom server renderer outputs. I picked the name because it's a reasonable name but also because the npm name is currently owned by a friend of the project. The react-dom build has its own inlined server renderer under the name `react-dom/fizz`. There is also a noop renderer to be used for testing. At some point we might add a public one to test-renderer but for now I don't want to have to think about public API design for the tests.
Configuration menu - View commit details
-
Copy full SHA for 1d0f987 - Browse repository at this point
Copy the full SHA 1d0f987View commit details -
We need to separate the format (DOM, React Native, etc) from the host running the server (Node, Browser, etc).
Configuration menu - View commit details
-
Copy full SHA for 690e7de - Browse repository at this point
Copy the full SHA 690e7deView commit details -
Basic wiring between Node, Noop and DOM configs
The Node DOM API is pipeToNodeStream which accepts a writable stream.
Configuration menu - View commit details
-
Copy full SHA for baa36b8 - Browse repository at this point
Copy the full SHA baa36b8View commit details -
Merge host and format config in dynamic react-stream entry point
Simpler API this way but also avoids having to fork the wrapper config. Fixes noop builds.
Configuration menu - View commit details
-
Copy full SHA for dad379a - Browse repository at this point
Copy the full SHA dad379aView commit details -
Add setImmediate/Buffer globals to lint config
Used by the server renderer
Configuration menu - View commit details
-
Copy full SHA for 37b1031 - Browse repository at this point
Copy the full SHA 37b1031View commit details -
Also use forwarding to it from fizz.js in builds so that tests covers this.
Configuration menu - View commit details
-
Copy full SHA for a155b17 - Browse repository at this point
Copy the full SHA a155b17View commit details -
Make react-stream private since we're not ready to publish
or even name it yet
Configuration menu - View commit details
-
Copy full SHA for b0d61e3 - Browse repository at this point
Copy the full SHA b0d61e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 846e4a8 - Browse repository at this point
Copy the full SHA 846e4a8View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc27a9b - Browse repository at this point
Copy the full SHA dc27a9bView commit details -
This lets Fizz render to WHATWG streams. E.g. for rendering in a Service Worker. I added react-dom/unstable-fizz.browser as the entry point for this. Since we now have two configurations of DOM. I had to add another inlinedHostConfigs configuration called `dom-browser`. The reconciler treats this configuration the same as `dom`. For stream it checks against the ReactFizzHostConfigBrowser instead of the Node one.
Configuration menu - View commit details
-
Copy full SHA for ed1ed67 - Browse repository at this point
Copy the full SHA ed1ed67View commit details -
This is for testing server rendering - on the client.
Configuration menu - View commit details
-
Copy full SHA for 3d45ea1 - Browse repository at this point
Copy the full SHA 3d45ea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1182d1 - Browse repository at this point
Copy the full SHA b1182d1View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.