Remove ReactComponentTreeHook from internals (#19032)
We don't really support mixing minor versions anymore anyway. But seems safe to remove in 17.
Sebastian Markbåge committed
May 27, 2020 at 20:41 UTC
607148673b3156d051d1fed17cd49e83698dce54
2 files changed
+10
-24
packages/react/src/ReactSharedInternals.js
+1
-7
@@ -22,13 +22,7 @@ const ReactSharedInternals = {
22
};
23
24
if (__DEV__) {
25
- Object.assign(ReactSharedInternals, {
26
- // These should not be included in production.
27
- ReactDebugCurrentFrame,
28
- // Shim for React DOM 16.0.0 which still destructured (but not used) this.
29
- // TODO: remove in React 17.0.
30
- ReactComponentTreeHook: {},
31
- });
25
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
26
}
27
28
export default ReactSharedInternals;
packages/react/src/forks/ReactSharedInternals.umd.js
+9
-17
@@ -21,26 +21,18 @@ const ReactSharedInternals = {
21
ReactCurrentBatchConfig,
22
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
23
assign,
24
+
25
+ // Re-export the schedule API(s) for UMD bundles.
26
+ // This avoids introducing a dependency on a new UMD global in a minor update,
27
+ // Since that would be a breaking change (e.g. for all existing CodeSandboxes).
28
+ // This re-export is only required for UMD bundles;
29
+ // CJS bundles use the shared NPM package.
30
+ Scheduler,
31
+ SchedulerTracing,
32
};
33
34
if (__DEV__) {
27
- Object.assign(ReactSharedInternals, {
28
- // These should not be included in production.
29
- ReactDebugCurrentFrame,
30
- // Shim for React DOM 16.0.0 which still destructured (but not used) this.
31
- // TODO: remove in React 17.0.
32
- ReactComponentTreeHook: {},
33
- });
35
+ ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
36
}
37
36
-// Re-export the schedule API(s) for UMD bundles.
37
-// This avoids introducing a dependency on a new UMD global in a minor update,
38
-// Since that would be a breaking change (e.g. for all existing CodeSandboxes).
39
-// This re-export is only required for UMD bundles;
40
-// CJS bundles use the shared NPM package.
41
-Object.assign(ReactSharedInternals, {
42
- Scheduler,
43
- SchedulerTracing,
44
-});
45
-
38
export default ReactSharedInternals;