Skip to content

Commit 9f4b4ff

Browse files
committed
[lint] Enable custom hooks configuration for useEffectEvent calling rules (#34497)
We need to be able to specify additional effect hooks for the RulesOfHooks lint rule in order to allow useEffectEvent to be called by custom effects. ExhaustiveDeps does this with a regex suppplied to the rule, but that regex is not accessible from other rules. This diff introduces a `react-hooks` entry you can put in the eslint settings that allows you to specify custom effect hooks and share them across all rules. This works like: ``` { settings: { 'react-hooks': { additionalEffectHooks: string, }, }, } ``` The next diff allows useEffect to read from the same configuration. ---- --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34497). * #34637 * __->__ #34497 DiffTrain build for [92cfdc3](92cfdc3)
1 parent 7b12110 commit 9f4b4ff

27 files changed

+172
-95
lines changed

compiled-rn/VERSION_NATIVE_FB

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19.2.0-native-fb-063394cf-20250930
1+
19.2.0-native-fb-92cfdc3a-20250930

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<<d3e3679f5dd6505501ec39ef3df011fc>>
10+
* @generated SignedSource<<afe364d7d464dd4c9a1915395766cf43>>
1111
*/
1212

1313
"use strict";
@@ -404,5 +404,5 @@ __DEV__ &&
404404
exports.useFormStatus = function () {
405405
return resolveDispatcher().useHostTransitionStatus();
406406
};
407-
exports.version = "19.2.0-native-fb-063394cf-20250930";
407+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";
408408
})();

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<<ce5e1db26757522eeb21b9d8ebe38395>>
10+
* @generated SignedSource<<4ddc7aa666e05f9113eba8c6dcc4082f>>
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.2.0-native-fb-063394cf-20250930";
206+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";

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<<ce5e1db26757522eeb21b9d8ebe38395>>
10+
* @generated SignedSource<<4ddc7aa666e05f9113eba8c6dcc4082f>>
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.2.0-native-fb-063394cf-20250930";
206+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";

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<<2decfc5286106cc84217016f38d5c824>>
10+
* @generated SignedSource<<f1a9ca58e5ec0daf418b5e1fdc167de6>>
1111
*/
1212

1313
/*
@@ -30042,11 +30042,11 @@ __DEV__ &&
3004230042
};
3004330043
(function () {
3004430044
var isomorphicReactPackageVersion = React.version;
30045-
if ("19.2.0-native-fb-063394cf-20250930" !== isomorphicReactPackageVersion)
30045+
if ("19.2.0-native-fb-92cfdc3a-20250930" !== isomorphicReactPackageVersion)
3004630046
throw Error(
3004730047
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3004830048
(isomorphicReactPackageVersion +
30049-
"\n - react-dom: 19.2.0-native-fb-063394cf-20250930\nLearn more: https://react.dev/warnings/version-mismatch")
30049+
"\n - react-dom: 19.2.0-native-fb-92cfdc3a-20250930\nLearn more: https://react.dev/warnings/version-mismatch")
3005030050
);
3005130051
})();
3005230052
("function" === typeof Map &&
@@ -30083,10 +30083,10 @@ __DEV__ &&
3008330083
!(function () {
3008430084
var internals = {
3008530085
bundleType: 1,
30086-
version: "19.2.0-native-fb-063394cf-20250930",
30086+
version: "19.2.0-native-fb-92cfdc3a-20250930",
3008730087
rendererPackageName: "react-dom",
3008830088
currentDispatcherRef: ReactSharedInternals,
30089-
reconcilerVersion: "19.2.0-native-fb-063394cf-20250930"
30089+
reconcilerVersion: "19.2.0-native-fb-92cfdc3a-20250930"
3009030090
};
3009130091
internals.overrideHookState = overrideHookState;
3009230092
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30236,5 +30236,5 @@ __DEV__ &&
3023630236
listenToAllSupportedEvents(container);
3023730237
return new ReactDOMHydrationRoot(initialChildren);
3023830238
};
30239-
exports.version = "19.2.0-native-fb-063394cf-20250930";
30239+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";
3024030240
})();

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<<2ef7499694290de96b0217308953e6d1>>
10+
* @generated SignedSource<<c19ada7fdb3b21a4093c52b8c8cb924d>>
1111
*/
1212

1313
/*
@@ -17577,14 +17577,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1757717577
};
1757817578
var isomorphicReactPackageVersion$jscomp$inline_2059 = React.version;
1757917579
if (
17580-
"19.2.0-native-fb-063394cf-20250930" !==
17580+
"19.2.0-native-fb-92cfdc3a-20250930" !==
1758117581
isomorphicReactPackageVersion$jscomp$inline_2059
1758217582
)
1758317583
throw Error(
1758417584
formatProdErrorMessage(
1758517585
527,
1758617586
isomorphicReactPackageVersion$jscomp$inline_2059,
17587-
"19.2.0-native-fb-063394cf-20250930"
17587+
"19.2.0-native-fb-92cfdc3a-20250930"
1758817588
)
1758917589
);
1759017590
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17606,10 +17606,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1760617606
};
1760717607
var internals$jscomp$inline_2636 = {
1760817608
bundleType: 0,
17609-
version: "19.2.0-native-fb-063394cf-20250930",
17609+
version: "19.2.0-native-fb-92cfdc3a-20250930",
1761017610
rendererPackageName: "react-dom",
1761117611
currentDispatcherRef: ReactSharedInternals,
17612-
reconcilerVersion: "19.2.0-native-fb-063394cf-20250930"
17612+
reconcilerVersion: "19.2.0-native-fb-92cfdc3a-20250930"
1761317613
};
1761417614
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1761517615
var hook$jscomp$inline_2637 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17716,4 +17716,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1771617716
listenToAllSupportedEvents(container);
1771717717
return new ReactDOMHydrationRoot(initialChildren);
1771817718
};
17719-
exports.version = "19.2.0-native-fb-063394cf-20250930";
17719+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";

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<<4776e20f664b406b003332fed06db9c0>>
10+
* @generated SignedSource<<6621b2d86eeae904280b790b1ccf1c49>>
1111
*/
1212

1313
/*
@@ -19697,14 +19697,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1969719697
};
1969819698
var isomorphicReactPackageVersion$jscomp$inline_2374 = React.version;
1969919699
if (
19700-
"19.2.0-native-fb-063394cf-20250930" !==
19700+
"19.2.0-native-fb-92cfdc3a-20250930" !==
1970119701
isomorphicReactPackageVersion$jscomp$inline_2374
1970219702
)
1970319703
throw Error(
1970419704
formatProdErrorMessage(
1970519705
527,
1970619706
isomorphicReactPackageVersion$jscomp$inline_2374,
19707-
"19.2.0-native-fb-063394cf-20250930"
19707+
"19.2.0-native-fb-92cfdc3a-20250930"
1970819708
)
1970919709
);
1971019710
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19726,10 +19726,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1972619726
};
1972719727
var internals$jscomp$inline_2381 = {
1972819728
bundleType: 0,
19729-
version: "19.2.0-native-fb-063394cf-20250930",
19729+
version: "19.2.0-native-fb-92cfdc3a-20250930",
1973019730
rendererPackageName: "react-dom",
1973119731
currentDispatcherRef: ReactSharedInternals,
19732-
reconcilerVersion: "19.2.0-native-fb-063394cf-20250930",
19732+
reconcilerVersion: "19.2.0-native-fb-92cfdc3a-20250930",
1973319733
getLaneLabelMap: function () {
1973419734
for (
1973519735
var map = new Map(), lane = 1, index$331 = 0;
@@ -19852,4 +19852,4 @@ exports.hydrateRoot = function (container, initialChildren, options) {
1985219852
listenToAllSupportedEvents(container);
1985319853
return new ReactDOMHydrationRoot(initialChildren);
1985419854
};
19855-
exports.version = "19.2.0-native-fb-063394cf-20250930";
19855+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";

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<<357b216828b1a58c89e5a091620676b5>>
10+
* @generated SignedSource<<17efb7963fa0ba99901dc0d59685d1bf>>
1111
*/
1212

1313
/*
@@ -30098,11 +30098,11 @@ __DEV__ &&
3009830098
};
3009930099
(function () {
3010030100
var isomorphicReactPackageVersion = React.version;
30101-
if ("19.2.0-native-fb-063394cf-20250930" !== isomorphicReactPackageVersion)
30101+
if ("19.2.0-native-fb-92cfdc3a-20250930" !== isomorphicReactPackageVersion)
3010230102
throw Error(
3010330103
'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' +
3010430104
(isomorphicReactPackageVersion +
30105-
"\n - react-dom: 19.2.0-native-fb-063394cf-20250930\nLearn more: https://react.dev/warnings/version-mismatch")
30105+
"\n - react-dom: 19.2.0-native-fb-92cfdc3a-20250930\nLearn more: https://react.dev/warnings/version-mismatch")
3010630106
);
3010730107
})();
3010830108
("function" === typeof Map &&
@@ -30139,10 +30139,10 @@ __DEV__ &&
3013930139
!(function () {
3014030140
var internals = {
3014130141
bundleType: 1,
30142-
version: "19.2.0-native-fb-063394cf-20250930",
30142+
version: "19.2.0-native-fb-92cfdc3a-20250930",
3014330143
rendererPackageName: "react-dom",
3014430144
currentDispatcherRef: ReactSharedInternals,
30145-
reconcilerVersion: "19.2.0-native-fb-063394cf-20250930"
30145+
reconcilerVersion: "19.2.0-native-fb-92cfdc3a-20250930"
3014630146
};
3014730147
internals.overrideHookState = overrideHookState;
3014830148
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -30608,7 +30608,7 @@ __DEV__ &&
3060830608
exports.useFormStatus = function () {
3060930609
return resolveDispatcher().useHostTransitionStatus();
3061030610
};
30611-
exports.version = "19.2.0-native-fb-063394cf-20250930";
30611+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";
3061230612
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
3061330613
"function" ===
3061430614
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<<02ce911691a18c95e7c19575abd401dd>>
10+
* @generated SignedSource<<5709390436692924d78ceec48e61178e>>
1111
*/
1212

1313
/*
@@ -17588,14 +17588,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1758817588
};
1758917589
var isomorphicReactPackageVersion$jscomp$inline_2060 = React.version;
1759017590
if (
17591-
"19.2.0-native-fb-063394cf-20250930" !==
17591+
"19.2.0-native-fb-92cfdc3a-20250930" !==
1759217592
isomorphicReactPackageVersion$jscomp$inline_2060
1759317593
)
1759417594
throw Error(
1759517595
formatProdErrorMessage(
1759617596
527,
1759717597
isomorphicReactPackageVersion$jscomp$inline_2060,
17598-
"19.2.0-native-fb-063394cf-20250930"
17598+
"19.2.0-native-fb-92cfdc3a-20250930"
1759917599
)
1760017600
);
1760117601
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -17617,10 +17617,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1761717617
};
1761817618
var internals$jscomp$inline_2639 = {
1761917619
bundleType: 0,
17620-
version: "19.2.0-native-fb-063394cf-20250930",
17620+
version: "19.2.0-native-fb-92cfdc3a-20250930",
1762117621
rendererPackageName: "react-dom",
1762217622
currentDispatcherRef: ReactSharedInternals,
17623-
reconcilerVersion: "19.2.0-native-fb-063394cf-20250930"
17623+
reconcilerVersion: "19.2.0-native-fb-92cfdc3a-20250930"
1762417624
};
1762517625
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
1762617626
var hook$jscomp$inline_2640 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -17880,4 +17880,4 @@ exports.useFormState = function (action, initialState, permalink) {
1788017880
exports.useFormStatus = function () {
1788117881
return ReactSharedInternals.H.useHostTransitionStatus();
1788217882
};
17883-
exports.version = "19.2.0-native-fb-063394cf-20250930";
17883+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";

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<<adb0358ed9eb8b6b780160c49fc6235d>>
10+
* @generated SignedSource<<3f75474034d10497d357e3f3cb9eb4ec>>
1111
*/
1212

1313
/*
@@ -19712,14 +19712,14 @@ ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {
1971219712
};
1971319713
var isomorphicReactPackageVersion$jscomp$inline_2375 = React.version;
1971419714
if (
19715-
"19.2.0-native-fb-063394cf-20250930" !==
19715+
"19.2.0-native-fb-92cfdc3a-20250930" !==
1971619716
isomorphicReactPackageVersion$jscomp$inline_2375
1971719717
)
1971819718
throw Error(
1971919719
formatProdErrorMessage(
1972019720
527,
1972119721
isomorphicReactPackageVersion$jscomp$inline_2375,
19722-
"19.2.0-native-fb-063394cf-20250930"
19722+
"19.2.0-native-fb-92cfdc3a-20250930"
1972319723
)
1972419724
);
1972519725
ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
@@ -19741,10 +19741,10 @@ ReactDOMSharedInternals.findDOMNode = function (componentOrElement) {
1974119741
};
1974219742
var internals$jscomp$inline_2382 = {
1974319743
bundleType: 0,
19744-
version: "19.2.0-native-fb-063394cf-20250930",
19744+
version: "19.2.0-native-fb-92cfdc3a-20250930",
1974519745
rendererPackageName: "react-dom",
1974619746
currentDispatcherRef: ReactSharedInternals,
19747-
reconcilerVersion: "19.2.0-native-fb-063394cf-20250930",
19747+
reconcilerVersion: "19.2.0-native-fb-92cfdc3a-20250930",
1974819748
getLaneLabelMap: function () {
1974919749
for (
1975019750
var map = new Map(), lane = 1, index$331 = 0;
@@ -20020,7 +20020,7 @@ exports.useFormState = function (action, initialState, permalink) {
2002020020
exports.useFormStatus = function () {
2002120021
return ReactSharedInternals.H.useHostTransitionStatus();
2002220022
};
20023-
exports.version = "19.2.0-native-fb-063394cf-20250930";
20023+
exports.version = "19.2.0-native-fb-92cfdc3a-20250930";
2002420024
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
2002520025
"function" ===
2002620026
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)