Skip to content

Commit bd06b96

Browse files
committed
[flow] Eliminate usage of more than 1-arg React.AbstractComponent in React codebase (#31314)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> ## Summary In order to adopt react 19's ref-as-prop model, Flow needs to eliminate all the places where they are treated differently. `React.AbstractComponent` is the worst example of this, and we need to eliminate it. This PR eliminates them from the react repo, and only keeps the one that has 1 argument of props. ## How did you test this change? yarn flow DiffTrain build for [45804af](45804af)
1 parent 750a0e4 commit bd06b96

24 files changed

Lines changed: 95 additions & 96 deletions

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.0.0-native-fb-b8ae38f8-20241018
1+
19.0.0-native-fb-45804af1-20241021

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<1f1399e9fe0f1bfa130bc796943b0554>>
10+
* @generated SignedSource<<793d57c1e9f1c6b971aca21d043d2f21>>
1111
*/
1212

1313
"use strict";
@@ -420,5 +420,5 @@ __DEV__ &&
420420
exports.useFormStatus = function () {
421421
return resolveDispatcher().useHostTransitionStatus();
422422
};
423-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
423+
exports.version = "19.0.0-native-fb-45804af1-20241021";
424424
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<8bc05e324822aae609cf6f750242a2ec>>
10+
* @generated SignedSource<<8b38afb370047fb53563f5f6daa8ddf0>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
206+
exports.version = "19.0.0-native-fb-45804af1-20241021";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOM-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<8bc05e324822aae609cf6f750242a2ec>>
10+
* @generated SignedSource<<8b38afb370047fb53563f5f6daa8ddf0>>
1111
*/
1212

1313
"use strict";
@@ -203,4 +203,4 @@ exports.useFormState = function (action, initialState, permalink) {
203203
exports.useFormStatus = function () {
204204
return ReactSharedInternals.H.useHostTransitionStatus();
205205
};
206-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
206+
exports.version = "19.0.0-native-fb-45804af1-20241021";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-dev.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<b1adf5fbcf2b6118e3619e7b2f03d287>>
10+
* @generated SignedSource<<c1b568c187b173b15a42db3491042934>>
1111
*/
1212

1313
/*
@@ -25352,11 +25352,11 @@ __DEV__ &&
2535225352
};
2535325353
(function () {
2535425354
var isomorphicReactPackageVersion = React.version;
25355-
if ("19.0.0-native-fb-b8ae38f8-20241018" !== isomorphicReactPackageVersion)
25355+
if ("19.0.0-native-fb-45804af1-20241021" !== isomorphicReactPackageVersion)
2535625356
throw Error(
2535725357
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2535825358
(isomorphicReactPackageVersion +
25359-
"\n - react-dom: 19.0.0-native-fb-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch")
25359+
"\n - react-dom: 19.0.0-native-fb-45804af1-20241021\nLearn more: https://react.dev/warnings/version-mismatch")
2536025360
);
2536125361
})();
2536225362
("function" === typeof Map &&
@@ -25393,11 +25393,11 @@ __DEV__ &&
2539325393
!(function () {
2539425394
var internals = {
2539525395
bundleType: 1,
25396-
version: "19.0.0-native-fb-b8ae38f8-20241018",
25396+
version: "19.0.0-native-fb-45804af1-20241021",
2539725397
rendererPackageName: "react-dom",
2539825398
currentDispatcherRef: ReactSharedInternals,
2539925399
findFiberByHostInstance: getClosestInstanceFromNode,
25400-
reconcilerVersion: "19.0.0-native-fb-b8ae38f8-20241018"
25400+
reconcilerVersion: "19.0.0-native-fb-45804af1-20241021"
2540125401
};
2540225402
internals.overrideHookState = overrideHookState;
2540325403
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -25541,5 +25541,5 @@ __DEV__ &&
2554125541
listenToAllSupportedEvents(container);
2554225542
return new ReactDOMHydrationRoot(initialChildren);
2554325543
};
25544-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
25544+
exports.version = "19.0.0-native-fb-45804af1-20241021";
2554525545
})();

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<a25f1f66cbb4ef0610b278541f278c6f>>
10+
* @generated SignedSource<<b0f746d4dfa36e822b278607ad45a410>>
1111
*/
1212

1313
/*
@@ -15642,14 +15642,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1564215642
};
1564315643
var isomorphicReactPackageVersion$jscomp$inline_1698 = React.version;
1564415644
if (
15645-
"19.0.0-native-fb-b8ae38f8-20241018" !==
15645+
"19.0.0-native-fb-45804af1-20241021" !==
1564615646
isomorphicReactPackageVersion$jscomp$inline_1698
1564715647
)
1564815648
throw Error(
1564915649
formatProdErrorMessage(
1565015650
527,
1565115651
isomorphicReactPackageVersion$jscomp$inline_1698,
15652-
"19.0.0-native-fb-b8ae38f8-20241018"
15652+
"19.0.0-native-fb-45804af1-20241021"
1565315653
)
1565415654
);
1565515655
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15671,11 +15671,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1567115671
};
1567215672
var internals$jscomp$inline_2151 = {
1567315673
bundleType: 0,
15674-
version: "19.0.0-native-fb-b8ae38f8-20241018",
15674+
version: "19.0.0-native-fb-45804af1-20241021",
1567515675
rendererPackageName: "react-dom",
1567615676
currentDispatcherRef: ReactSharedInternals,
1567715677
findFiberByHostInstance: getClosestInstanceFromNode,
15678-
reconcilerVersion: "19.0.0-native-fb-b8ae38f8-20241018"
15678+
reconcilerVersion: "19.0.0-native-fb-45804af1-20241021"
1567915679
};
1568015680
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1568115681
var hook$jscomp$inline_2152 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15779,4 +15779,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1577915779
listenToAllSupportedEvents(container);
1578015780
return new ReactDOMHydrationRoot(initialChildren);
1578115781
};
15782-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
15782+
exports.version = "19.0.0-native-fb-45804af1-20241021";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMClient-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<3972c76130df9ee34317d3802fca3b8f>>
10+
* @generated SignedSource<<d450f897480401e2ac4d32ac3db37888>>
1111
*/
1212

1313
/*
@@ -16296,14 +16296,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1629616296
};
1629716297
var isomorphicReactPackageVersion$jscomp$inline_1788 = React.version;
1629816298
if (
16299-
"19.0.0-native-fb-b8ae38f8-20241018" !==
16299+
"19.0.0-native-fb-45804af1-20241021" !==
1630016300
isomorphicReactPackageVersion$jscomp$inline_1788
1630116301
)
1630216302
throw Error(
1630316303
formatProdErrorMessage(
1630416304
527,
1630516305
isomorphicReactPackageVersion$jscomp$inline_1788,
16306-
"19.0.0-native-fb-b8ae38f8-20241018"
16306+
"19.0.0-native-fb-45804af1-20241021"
1630716307
)
1630816308
);
1630916309
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16325,11 +16325,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1632516325
};
1632616326
var internals$jscomp$inline_1795 = {
1632716327
bundleType: 0,
16328-
version: "19.0.0-native-fb-b8ae38f8-20241018",
16328+
version: "19.0.0-native-fb-45804af1-20241021",
1632916329
rendererPackageName: "react-dom",
1633016330
currentDispatcherRef: ReactSharedInternals,
1633116331
findFiberByHostInstance: getClosestInstanceFromNode,
16332-
reconcilerVersion: "19.0.0-native-fb-b8ae38f8-20241018",
16332+
reconcilerVersion: "19.0.0-native-fb-45804af1-20241021",
1633316333
getLaneLabelMap: function () {
1633416334
for (
1633516335
var map = new Map(), lane = 1, index$291 = 0;
@@ -16448,4 +16448,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1644816448
listenToAllSupportedEvents(container);
1644916449
return new ReactDOMHydrationRoot(initialChildren);
1645016450
};
16451-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
16451+
exports.version = "19.0.0-native-fb-45804af1-20241021";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-dev.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<679d304c50640f2e226490c12b32c107>>
10+
* @generated SignedSource<<97ee9e798ac0e46aa25a0c5bc764ca27>>
1111
*/
1212

1313
/*
@@ -25413,11 +25413,11 @@ __DEV__ &&
2541325413
};
2541425414
(function () {
2541525415
var isomorphicReactPackageVersion = React.version;
25416-
if ("19.0.0-native-fb-b8ae38f8-20241018" !== isomorphicReactPackageVersion)
25416+
if ("19.0.0-native-fb-45804af1-20241021" !== isomorphicReactPackageVersion)
2541725417
throw Error(
2541825418
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
2541925419
(isomorphicReactPackageVersion +
25420-
"\n - react-dom: 19.0.0-native-fb-b8ae38f8-20241018\nLearn more: https://react.dev/warnings/version-mismatch")
25420+
"\n - react-dom: 19.0.0-native-fb-45804af1-20241021\nLearn more: https://react.dev/warnings/version-mismatch")
2542125421
);
2542225422
})();
2542325423
("function" === typeof Map &&
@@ -25454,11 +25454,11 @@ __DEV__ &&
2545425454
!(function () {
2545525455
var internals = {
2545625456
bundleType: 1,
25457-
version: "19.0.0-native-fb-b8ae38f8-20241018",
25457+
version: "19.0.0-native-fb-45804af1-20241021",
2545825458
rendererPackageName: "react-dom",
2545925459
currentDispatcherRef: ReactSharedInternals,
2546025460
findFiberByHostInstance: getClosestInstanceFromNode,
25461-
reconcilerVersion: "19.0.0-native-fb-b8ae38f8-20241018"
25461+
reconcilerVersion: "19.0.0-native-fb-45804af1-20241021"
2546225462
};
2546325463
internals.overrideHookState = overrideHookState;
2546425464
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -25918,7 +25918,7 @@ __DEV__ &&
2591825918
exports.useFormStatus = function () {
2591925919
return resolveDispatcher().useHostTransitionStatus();
2592025920
};
25921-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
25921+
exports.version = "19.0.0-native-fb-45804af1-20241021";
2592225922
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2592325923
"function" ===
2592425924
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e21fc2b716820323e0d8ae7cad1192f9>>
10+
* @generated SignedSource<<f4a6514fd617c75e652f8e808a255e12>>
1111
*/
1212

1313
/*
@@ -15653,14 +15653,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1565315653
};
1565415654
var isomorphicReactPackageVersion$jscomp$inline_1699 = React.version;
1565515655
if (
15656-
"19.0.0-native-fb-b8ae38f8-20241018" !==
15656+
"19.0.0-native-fb-45804af1-20241021" !==
1565715657
isomorphicReactPackageVersion$jscomp$inline_1699
1565815658
)
1565915659
throw Error(
1566015660
formatProdErrorMessage(
1566115661
527,
1566215662
isomorphicReactPackageVersion$jscomp$inline_1699,
15663-
"19.0.0-native-fb-b8ae38f8-20241018"
15663+
"19.0.0-native-fb-45804af1-20241021"
1566415664
)
1566515665
);
1566615666
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -15682,11 +15682,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1568215682
};
1568315683
var internals$jscomp$inline_2154 = {
1568415684
bundleType: 0,
15685-
version: "19.0.0-native-fb-b8ae38f8-20241018",
15685+
version: "19.0.0-native-fb-45804af1-20241021",
1568615686
rendererPackageName: "react-dom",
1568715687
currentDispatcherRef: ReactSharedInternals,
1568815688
findFiberByHostInstance: getClosestInstanceFromNode,
15689-
reconcilerVersion: "19.0.0-native-fb-b8ae38f8-20241018"
15689+
reconcilerVersion: "19.0.0-native-fb-45804af1-20241021"
1569015690
};
1569115691
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1569215692
var hook$jscomp$inline_2155 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -15944,4 +15944,4 @@ exports.useFormState = function (action, initialState, permalink) {
1594415944
exports.useFormStatus = function () {
1594515945
return ReactSharedInternals.H.useHostTransitionStatus();
1594615946
};
15947-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
15947+
exports.version = "19.0.0-native-fb-45804af1-20241021";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/react-dom/cjs/ReactDOMProfiling-profiling.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<e5170d9e4e736fc65a791eb76d807fcf>>
10+
* @generated SignedSource<<0f8579e95288f455a430bd5811509318>>
1111
*/
1212

1313
/*
@@ -16311,14 +16311,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1631116311
};
1631216312
var isomorphicReactPackageVersion$jscomp$inline_1789 = React.version;
1631316313
if (
16314-
"19.0.0-native-fb-b8ae38f8-20241018" !==
16314+
"19.0.0-native-fb-45804af1-20241021" !==
1631516315
isomorphicReactPackageVersion$jscomp$inline_1789
1631616316
)
1631716317
throw Error(
1631816318
formatProdErrorMessage(
1631916319
527,
1632016320
isomorphicReactPackageVersion$jscomp$inline_1789,
16321-
"19.0.0-native-fb-b8ae38f8-20241018"
16321+
"19.0.0-native-fb-45804af1-20241021"
1632216322
)
1632316323
);
1632416324
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -16340,11 +16340,11 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1634016340
};
1634116341
var internals$jscomp$inline_1796 = {
1634216342
bundleType: 0,
16343-
version: "19.0.0-native-fb-b8ae38f8-20241018",
16343+
version: "19.0.0-native-fb-45804af1-20241021",
1634416344
rendererPackageName: "react-dom",
1634516345
currentDispatcherRef: ReactSharedInternals,
1634616346
findFiberByHostInstance: getClosestInstanceFromNode,
16347-
reconcilerVersion: "19.0.0-native-fb-b8ae38f8-20241018",
16347+
reconcilerVersion: "19.0.0-native-fb-45804af1-20241021",
1634816348
getLaneLabelMap: function () {
1634916349
for (
1635016350
var map = new Map(), lane = 1, index$291 = 0;
@@ -16617,7 +16617,7 @@ exports.useFormState = function (action, initialState, permalink) {
1661716617
exports.useFormStatus = function () {
1661816618
return ReactSharedInternals.H.useHostTransitionStatus();
1661916619
};
16620-
exports.version = "19.0.0-native-fb-b8ae38f8-20241018";
16620+
exports.version = "19.0.0-native-fb-45804af1-20241021";
1662116621
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1662216622
"function" ===
1662316623
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)