-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
[ServerRenderer] Move fizz external runtime implementation to react-dom-bindings #25617
Conversation
Comparing: 1a90262...6e5e622 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
I think what you did here makes sense. It's designed primarily to be treated as a static asset, but we may as well make it work if you import it as a module, too. |
* 'main' of ssh://github.com/GrinZero/react: (163 commits) Do not unmount layout effects if ancestor Offscreen is hidden (facebook#25628) Remove check in renderDidSuspendDelayIfPossible (facebook#25630) [ServerRenderer] Move fizz external runtime implementation to react-dom-bindings (facebook#25617) Unwrap sync resolved thenables without suspending (facebook#25615) refactor isHostResourceType to not receive the context from reconciler and not leak types (facebook#25610) Make host context use null as empty and only error in dev (facebook#25609) [Float] handle resource Resource creation inside svg context (facebook#25599) Allow uncached IO to stablize (facebook#25561) [ServerRenderer] Setup for adding data attributes streaming format (facebook#25567) Do not unmount layout effects on initial Offscreen mount (facebook#25592) Fix type check for null (facebook#25595) Clean up vestige of useOpaqueIdentifier (facebook#25587) Extract logic for detecting bad fallback to helper Split suspended work loop logic into separate functions In work loop, add enum of reasons for suspending Strict Mode: Reuse memoized result from first pass (facebook#25583) Detect and warn if use(promise) is wrapped with try/catch block (facebook#25543) Remove old react-fetch, react-fs and react-pg libraries (facebook#25577) Try assigning fetch to globalThis if global assignment fails (facebook#25571) [Float] handle noscript context for Resources (facebook#25559) ... # Conflicts: # scripts/rollup/build.js
Summary: This sync includes the following changes: - **[4bd245e9e](facebook/react@4bd245e9e )**: Do not unmount layout effects if ancestor Offscreen is hidden ([#25628](facebook/react#25628)) //<Samuel Susla>// - **[df61e708c](facebook/react@df61e708c )**: Remove check in renderDidSuspendDelayIfPossible ([#25630](facebook/react#25630)) //<Andrew Clark>// - **[1a08f1478](facebook/react@1a08f1478 )**: [ServerRenderer] Move fizz external runtime implementation to react-dom-bindings ([#25617](facebook/react#25617)) //<mofeiZ>// - **[1a902623a](facebook/react@1a902623a )**: Unwrap sync resolved thenables without suspending ([#25615](facebook/react#25615)) //<Andrew Clark>// - **[4ea063b56](facebook/react@4ea063b56 )**: refactor isHostResourceType to not receive the context from reconciler and not leak types ([#25610](facebook/react#25610)) //<Josh Story>// - **[8e69bc45a](facebook/react@8e69bc45a )**: Make host context use null as empty and only error in dev ([#25609](facebook/react#25609)) //<Sebastian Markbåge>// - **[5f7ef8c4c](facebook/react@5f7ef8c4c )**: [Float] handle resource Resource creation inside svg context ([#25599](facebook/react#25599)) //<Josh Story>// - **[36426e6cb](facebook/react@36426e6cb )**: Allow uncached IO to stablize ([#25561](facebook/react#25561)) //<Andrew Clark>// - **[6883d7944](facebook/react@6883d7944 )**: [ServerRenderer] Setup for adding data attributes streaming format ([#25567](facebook/react#25567)) //<mofeiZ>// Changelog: [General][Changed] - React Native sync for revisions ab075a2...4bd245e jest_e2e[run_all_tests] Reviewed By: GijsWeterings Differential Revision: D41028209 fbshipit-source-id: a67fdcd441ddd50784f7c1ce402eaecdb5e3126d
…om-bindings (#25617) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> Following [comment](#25437 (comment)) in #25437 , the external runtime implementation should be moved from `react-dom` to `react-dom-bindings`. I did have a question here: I set the entrypoint to `react-dom/unstable_server-external-runtime.js`, since a.) I was following #25436 as an example and b.) `react-dom-bindings` was missing a `README.md` and `npm/`. This also involved adding the external runtime to `package.json`. However, the external runtime isn't really a `react-dom` entrypoint. Is this change alright, or should I change the bundling code instead? ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
…om-bindings (facebook#25617) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> Following [comment](facebook#25437 (comment)) in facebook#25437 , the external runtime implementation should be moved from `react-dom` to `react-dom-bindings`. I did have a question here: I set the entrypoint to `react-dom/unstable_server-external-runtime.js`, since a.) I was following facebook#25436 as an example and b.) `react-dom-bindings` was missing a `README.md` and `npm/`. This also involved adding the external runtime to `package.json`. However, the external runtime isn't really a `react-dom` entrypoint. Is this change alright, or should I change the bundling code instead? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
Summary: This sync includes the following changes: - **[4bd245e9e](facebook/react@4bd245e9e )**: Do not unmount layout effects if ancestor Offscreen is hidden ([facebook#25628](facebook/react#25628)) //<Samuel Susla>// - **[df61e708c](facebook/react@df61e708c )**: Remove check in renderDidSuspendDelayIfPossible ([facebook#25630](facebook/react#25630)) //<Andrew Clark>// - **[1a08f1478](facebook/react@1a08f1478 )**: [ServerRenderer] Move fizz external runtime implementation to react-dom-bindings ([facebook#25617](facebook/react#25617)) //<mofeiZ>// - **[1a902623a](facebook/react@1a902623a )**: Unwrap sync resolved thenables without suspending ([facebook#25615](facebook/react#25615)) //<Andrew Clark>// - **[4ea063b56](facebook/react@4ea063b56 )**: refactor isHostResourceType to not receive the context from reconciler and not leak types ([facebook#25610](facebook/react#25610)) //<Josh Story>// - **[8e69bc45a](facebook/react@8e69bc45a )**: Make host context use null as empty and only error in dev ([facebook#25609](facebook/react#25609)) //<Sebastian Markbåge>// - **[5f7ef8c4c](facebook/react@5f7ef8c4c )**: [Float] handle resource Resource creation inside svg context ([facebook#25599](facebook/react#25599)) //<Josh Story>// - **[36426e6cb](facebook/react@36426e6cb )**: Allow uncached IO to stablize ([facebook#25561](facebook/react#25561)) //<Andrew Clark>// - **[6883d7944](facebook/react@6883d7944 )**: [ServerRenderer] Setup for adding data attributes streaming format ([facebook#25567](facebook/react#25567)) //<mofeiZ>// Changelog: [General][Changed] - React Native sync for revisions ab075a2...4bd245e jest_e2e[run_all_tests] Reviewed By: GijsWeterings Differential Revision: D41028209 fbshipit-source-id: a67fdcd441ddd50784f7c1ce402eaecdb5e3126d
Following comment in #25437 , the external runtime implementation should be moved from
react-dom
toreact-dom-bindings
.I did have a question here:
I set the entrypoint to
react-dom/unstable_server-external-runtime.js
, since a.) I was following #25436 as an example and b.)react-dom-bindings
was missing aREADME.md
andnpm/
. This also involved adding the external runtime topackage.json
.However, the external runtime isn't really a
react-dom
entrypoint. Is this change alright, or should I change the bundling code instead?How did you test this change?