From 36a0806a849c0f1cb3434bf85372b09b65b6b176 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 8 Nov 2022 22:39:55 +0100 Subject: [PATCH] Update InvalidNestedHooksDispatcherOnRerenderInDEV --- packages/react-reconciler/src/ReactFiberHooks.new.js | 2 +- packages/react-reconciler/src/ReactFiberHooks.old.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index f7525d9034cad..f6a8c79761030 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -4029,7 +4029,7 @@ if (__DEV__) { currentHookNameInDev = 'useSyncExternalStore'; warnInvalidHookAccess(); updateHookTypesDev(); - return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); + return rerenderSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); }, useId(): string { currentHookNameInDev = 'useId'; diff --git a/packages/react-reconciler/src/ReactFiberHooks.old.js b/packages/react-reconciler/src/ReactFiberHooks.old.js index 04b89ea176f5e..9aa4e813c6a2b 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.old.js +++ b/packages/react-reconciler/src/ReactFiberHooks.old.js @@ -4029,7 +4029,7 @@ if (__DEV__) { currentHookNameInDev = 'useSyncExternalStore'; warnInvalidHookAccess(); updateHookTypesDev(); - return updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); + return rerenderSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); }, useId(): string { currentHookNameInDev = 'useId';