Skip to content

Commit 5f2837f

Browse files
committed
[crud] Fill in missing dispatcher definition
Happens to the best of us.
1 parent 7c254b6 commit 5f2837f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/react-reconciler/src/ReactFiberHooks.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5241,6 +5241,27 @@ if (__DEV__) {
52415241
return mountEvent(callback);
52425242
};
52435243
}
5244+
if (enableUseResourceEffectHook) {
5245+
(InvalidNestedHooksDispatcherOnMountInDEV: Dispatcher).useResourceEffect =
5246+
function useResourceEffect(
5247+
create: () => mixed,
5248+
createDeps: Array<mixed> | void | null,
5249+
update: ((resource: mixed) => void) | void,
5250+
updateDeps: Array<mixed> | void | null,
5251+
destroy: ((resource: mixed) => void) | void,
5252+
) {
5253+
currentHookNameInDev = 'useResourceEffect';
5254+
warnInvalidHookAccess();
5255+
mountHookTypesDev();
5256+
return mountResourceEffect(
5257+
create,
5258+
createDeps,
5259+
update,
5260+
updateDeps,
5261+
destroy,
5262+
);
5263+
};
5264+
}
52445265
if (InvalidNestedHooksDispatcherOnMountInDEV) {
52455266
(HooksDispatcherOnRerenderInDEV: Dispatcher).useResourceEffect =
52465267
function useResourceEffect(

0 commit comments

Comments
 (0)