dillon1000/react

Commit

Rename the react.element symbol to react.transitional.element (#28813)

We have changed the shape (and the runtime) of React Elements. To help
avoid precompiled or inlined JSX having subtle breakages or deopting
hidden classes, I renamed the symbol so that we can early error if
private implementation details are used or mismatching versions are
used.

Why "transitional"? Well, because this is not the last time we'll change
the shape. This is just a stepping stone to removing the `ref` field on
the elements in the next version so we'll likely have to do it again.
Browse files
Changed paths18 files
First-parent comparison
M packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js ModifiedM packages/react-devtools-shared/src/backend/ReactSymbols.js ModifiedM packages/react-dom/src/__tests__/ReactComponent-test.js ModifiedM packages/react-dom/src/__tests__/ReactDOMOption-test.js ModifiedM packages/react-dom/src/__tests__/refs-test.js ModifiedM packages/react-reconciler/src/ReactChildFiber.js ModifiedM packages/react/src/jsx/ReactJSXElement.js ModifiedM packages/shared/ReactFeatureFlags.js ModifiedM packages/shared/ReactSymbols.js ModifiedM packages/shared/__tests__/ReactSymbols-test.internal.js ModifiedM packages/shared/forks/ReactFeatureFlags.native-fb.js ModifiedM packages/shared/forks/ReactFeatureFlags.native-oss.js ModifiedM packages/shared/forks/ReactFeatureFlags.test-renderer.js ModifiedM packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js ModifiedM packages/shared/forks/ReactFeatureFlags.test-renderer.www.js ModifiedM packages/shared/forks/ReactFeatureFlags.www.js ModifiedM packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShared-test.js ModifiedM scripts/error-codes/codes.json Modified
Patch

Files changed

Rendering syntax-highlighted changes…