dillon1000/react
Commit
Browse files [Float] add support for scripts and other enhancements (#25480)
* float enhance!!! Support preinit as script Support resources from async scripts Support saving the precedence place when rendering the shell There was a significant change to the flushing order of resources which follows the general principal of... 1. stuff that blocks display 2. stuff that we know will be used 3. stuff that was explicitly preloaded As a consequence if you preinit a style now it won't automatically flush in the shell unless you actually depend on it in your tree. To avoid races with precedence order we now emit a tag that saves the place amongst the precedence hierarchy so late insertions still end up where they were intended There is also a novel hydration pathway for certain tags. If you render an async script with an onLoad or onError it will always treat it like an insertion rather than a hydration. * restore preinit style flushing behavior and nits
Changed paths15 files
First-parent comparisonpackages/react-dom-bindings/src/client/ReactDOMComponentTree.js ModifiedM packages/react-dom-bindings/src/client/ReactDOMFloatClient.js ModifiedM packages/react-dom-bindings/src/client/ReactDOMHostConfig.js ModifiedM packages/react-dom-bindings/src/server/ReactDOMFloatServer.js ModifiedM packages/react-dom-bindings/src/server/ReactDOMServerFormatConfig.js ModifiedM packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSet.js ModifiedM packages/react-dom-bindings/src/server/fizz-instruction-set/ReactDOMFizzInstructionSetInlineCodeStrings.js ModifiedM packages/react-dom-bindings/src/shared/ReactDOMResourceValidation.js ModifiedM packages/react-dom/src/__tests__/ReactDOMFloat-test.js ModifiedM packages/react-dom/src/__tests__/react-dom-server-rendering-stub-test.js ModifiedM packages/react-reconciler/src/ReactFiberHostConfigWithNoHydration.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.new.js ModifiedM packages/react-reconciler/src/ReactFiberHydrationContext.old.js ModifiedM packages/react-reconciler/src/forks/ReactFiberHostConfig.custom.js ModifiedM scripts/rollup/generate-inline-fizz-runtime.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…