Skip to content

Commit 64869b3

Browse files
committed
Clean up enableUseHook flag (#26707)
This has been statically enabled everywhere for months. DiffTrain build for commit 7ce765e.
1 parent 812eeb4 commit 64869b3

File tree

13 files changed

+385
-457
lines changed

13 files changed

+385
-457
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 19 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<968b9a9a87595c8009c33efb698508af>>
10+
* @generated SignedSource<<c196c39a8657ac593b26ca40d9fedf8b>>
1111
*/
1212

1313
'use strict';
@@ -8299,6 +8299,7 @@ function entangleTransitionUpdate(root, queue, lane) {
82998299

83008300
var ContextOnlyDispatcher = {
83018301
readContext: readContext,
8302+
use: use,
83028303
useCallback: throwInvalidHookError,
83038304
useContext: throwInvalidHookError,
83048305
useEffect: throwInvalidHookError,
@@ -8321,10 +8322,6 @@ var ContextOnlyDispatcher = {
83218322
ContextOnlyDispatcher.useCacheRefresh = throwInvalidHookError;
83228323
}
83238324

8324-
{
8325-
ContextOnlyDispatcher.use = throwInvalidHookError;
8326-
}
8327-
83288325
var HooksDispatcherOnMountInDEV = null;
83298326
var HooksDispatcherOnMountWithHookTypesInDEV = null;
83308327
var HooksDispatcherOnUpdateInDEV = null;
@@ -8356,6 +8353,7 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
83568353
readContext: function (context) {
83578354
return readContext(context);
83588355
},
8356+
use: use,
83598357
useCallback: function (callback, deps) {
83608358
currentHookNameInDev = "useCallback";
83618359
mountHookTypesDev();
@@ -8476,14 +8474,11 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
84768474
};
84778475
}
84788476

8479-
{
8480-
HooksDispatcherOnMountInDEV.use = use;
8481-
}
8482-
84838477
HooksDispatcherOnMountWithHookTypesInDEV = {
84848478
readContext: function (context) {
84858479
return readContext(context);
84868480
},
8481+
use: use,
84878482
useCallback: function (callback, deps) {
84888483
currentHookNameInDev = "useCallback";
84898484
updateHookTypesDev();
@@ -8599,14 +8594,11 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
85998594
};
86008595
}
86018596

8602-
{
8603-
HooksDispatcherOnMountWithHookTypesInDEV.use = use;
8604-
}
8605-
86068597
HooksDispatcherOnUpdateInDEV = {
86078598
readContext: function (context) {
86088599
return readContext(context);
86098600
},
8601+
use: use,
86108602
useCallback: function (callback, deps) {
86118603
currentHookNameInDev = "useCallback";
86128604
updateHookTypesDev();
@@ -8721,14 +8713,11 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
87218713
};
87228714
}
87238715

8724-
{
8725-
HooksDispatcherOnUpdateInDEV.use = use;
8726-
}
8727-
87288716
HooksDispatcherOnRerenderInDEV = {
87298717
readContext: function (context) {
87308718
return readContext(context);
87318719
},
8720+
use: use,
87328721
useCallback: function (callback, deps) {
87338722
currentHookNameInDev = "useCallback";
87348723
updateHookTypesDev();
@@ -8844,15 +8833,15 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
88448833
};
88458834
}
88468835

8847-
{
8848-
HooksDispatcherOnRerenderInDEV.use = use;
8849-
}
8850-
88518836
InvalidNestedHooksDispatcherOnMountInDEV = {
88528837
readContext: function (context) {
88538838
warnInvalidContextAccess();
88548839
return readContext(context);
88558840
},
8841+
use: function (usable) {
8842+
warnInvalidHookAccess();
8843+
return use(usable);
8844+
},
88568845
useCallback: function (callback, deps) {
88578846
currentHookNameInDev = "useCallback";
88588847
warnInvalidHookAccess();
@@ -8984,18 +8973,15 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
89848973
};
89858974
}
89868975

8987-
{
8988-
InvalidNestedHooksDispatcherOnMountInDEV.use = function (usable) {
8989-
warnInvalidHookAccess();
8990-
return use(usable);
8991-
};
8992-
}
8993-
89948976
InvalidNestedHooksDispatcherOnUpdateInDEV = {
89958977
readContext: function (context) {
89968978
warnInvalidContextAccess();
89978979
return readContext(context);
89988980
},
8981+
use: function (usable) {
8982+
warnInvalidHookAccess();
8983+
return use(usable);
8984+
},
89998985
useCallback: function (callback, deps) {
90008986
currentHookNameInDev = "useCallback";
90018987
warnInvalidHookAccess();
@@ -9127,18 +9113,15 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
91279113
};
91289114
}
91299115

9130-
{
9131-
InvalidNestedHooksDispatcherOnUpdateInDEV.use = function (usable) {
9132-
warnInvalidHookAccess();
9133-
return use(usable);
9134-
};
9135-
}
9136-
91379116
InvalidNestedHooksDispatcherOnRerenderInDEV = {
91389117
readContext: function (context) {
91399118
warnInvalidContextAccess();
91409119
return readContext(context);
91419120
},
9121+
use: function (usable) {
9122+
warnInvalidHookAccess();
9123+
return use(usable);
9124+
},
91429125
useCallback: function (callback, deps) {
91439126
currentHookNameInDev = "useCallback";
91449127
warnInvalidHookAccess();
@@ -9269,13 +9252,6 @@ var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
92699252
return updateRefresh();
92709253
};
92719254
}
9272-
9273-
{
9274-
InvalidNestedHooksDispatcherOnRerenderInDEV.use = function (usable) {
9275-
warnInvalidHookAccess();
9276-
return use(usable);
9277-
};
9278-
}
92799255
}
92809256

92819257
var now = Scheduler$1.unstable_now;
@@ -23848,7 +23824,7 @@ function createFiberRoot(
2384823824
return root;
2384923825
}
2385023826

23851-
var ReactVersion = "18.3.0-next-a21d1475f-20230422";
23827+
var ReactVersion = "18.3.0-next-7ce765ec3-20230423";
2385223828

2385323829
// Might add PROFILE later.
2385423830

0 commit comments

Comments
 (0)