dillon1000/react
Commit
Browse files [Fizz] Implement New Context (#21255)
* Add NewContext module This implements a reverse linked list tree containing the previous contexts. * Implement recursive algorithm This algorithm pops the contexts back to a shared ancestor on the way down the stack and then pushes new contexts in reverse order up the stack. * Move isPrimaryRenderer to ServerFormatConfig This is primarily intended to be used to support renderToString with a separate build than the main one. This allows them to be nested. * Wire up more element type matchers * Wire up Context Provider type * Wire up Context Consumer * Test * Implement reader in class * Update error codez
Changed paths8 files
First-parent comparisonpackages/react-dom/src/__tests__/ReactDOMFizzServer-test.js ModifiedM packages/react-dom/src/server/ReactDOMServerFormatConfig.js ModifiedM packages/react-native-renderer/src/server/ReactNativeServerFormatConfig.js ModifiedM packages/react-server/src/ReactFizzClassComponent.js ModifiedA packages/react-server/src/ReactFizzNewContext.js AddedM packages/react-server/src/ReactFizzServer.js ModifiedM packages/react-server/src/forks/ReactServerFormatConfig.custom.js ModifiedM scripts/error-codes/codes.json ModifiedPatch
Files changed
Rendering syntax-highlighted changes…