dillon1000/react
Commit
Browse files Export captureOwnerStacks() only in DEV "react" builds (#29923)
Only with the enableOwnerStacks flag (which is not on in www). This is a new DEV-only API to be able to implement what we do for console.error in user space. This API does not actually include the current stack that you'd get from `new Error().stack`. That you'd have to add yourself. This adds the ability to have conditional development exports because we plan on eventually having separate ESM builds that use the "development" or "production" export conditions. NOTE: This removes the export of `act` from `react` in prod (as opposed to a function that throws) - inline with what we do with other conditional exports.
Changed paths14 files
First-parent comparisonpackages/react-reconciler/src/ReactCurrentFiber.js ModifiedA packages/react-reconciler/src/__tests__/ReactOwnerStacks-test.js AddedM packages/react-test-renderer/src/ReactTestRenderer.js ModifiedA packages/react/index.development.js AddedA packages/react/index.experimental.development.js AddedM packages/react/index.experimental.js ModifiedM packages/react/index.js ModifiedM packages/react/src/ReactClient.js ModifiedA packages/react/src/ReactOwnerStack.js AddedA packages/react/src/ReactServer.experimental.development.js AddedM packages/react/src/ReactSharedInternalsClient.js ModifiedM packages/react/src/ReactSharedInternalsServer.js ModifiedM scripts/jest/setupHostConfigs.js ModifiedM scripts/rollup/build.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…