Skip to content

Commit 2666642

Browse files
authored
Don't support older isomorphic React with newer renderers (facebook#18329)
* Don't support older isomorphic React with newer renderers * Remove the lazy hack
1 parent 3a0076e commit 2666642

File tree

7 files changed

+6
-24
lines changed

7 files changed

+6
-24
lines changed

packages/react-art/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"scheduler": "^0.19.0"
3030
},
3131
"peerDependencies": {
32-
"react": "^16.0.0"
32+
"react": "^16.13.0"
3333
},
3434
"files": [
3535
"LICENSE",

packages/react-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"scheduler": "^0.19.0"
2323
},
2424
"peerDependencies": {
25-
"react": "^16.0.0"
25+
"react": "^16.13.0"
2626
},
2727
"files": [
2828
"LICENSE",

packages/react-noop-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"react-server": "*"
1919
},
2020
"peerDependencies": {
21-
"react": "^16.0.0"
21+
"react": "^16.13.0"
2222
},
2323
"files": [
2424
"LICENSE",

packages/react-reconciler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"node": ">=0.10.0"
2727
},
2828
"peerDependencies": {
29-
"react": "^16.0.0"
29+
"react": "^16.13.0"
3030
},
3131
"dependencies": {
3232
"loose-envify": "^1.1.0",

packages/react-test-renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scheduler": "^0.19.0"
2626
},
2727
"peerDependencies": {
28-
"react": "^16.0.0"
28+
"react": "^16.13.0"
2929
},
3030
"files": [
3131
"LICENSE",

packages/shared/ReactLazyComponent.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ export function initializeLazyComponentType(
3838
lazyComponent: LazyComponent<any>,
3939
): void {
4040
if (lazyComponent._status === Uninitialized) {
41-
let ctor = lazyComponent._result;
42-
if (!ctor) {
43-
// TODO: Remove this later. THis only exists in case you use an older "react" package.
44-
ctor = ((lazyComponent: any)._ctor: typeof ctor);
45-
}
41+
const ctor = lazyComponent._result;
4642
const thenable = ctor();
4743
// Transition to the next state.
4844
const pending: PendingLazyComponent<any> = (lazyComponent: any);

packages/shared/ReactSharedInternals.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,4 @@ import * as React from 'react';
1212
const ReactSharedInternals =
1313
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1414

15-
// Prevent newer renderers from RTE when used with older react package versions.
16-
// Current owner and dispatcher used to share the same ref,
17-
// but PR #14548 split them out to better support the react-debug-tools package.
18-
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
19-
ReactSharedInternals.ReactCurrentDispatcher = {
20-
current: null,
21-
};
22-
}
23-
if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
24-
ReactSharedInternals.ReactCurrentBatchConfig = {
25-
suspense: null,
26-
};
27-
}
28-
2915
export default ReactSharedInternals;

0 commit comments

Comments
 (0)