mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
@@ -76,6 +76,7 @@ export function useSyncExternalStoreExtra<Snapshot, Selection>(
|
||||
}
|
||||
|
||||
// The snapshot has changed, so we need to compute a new selection.
|
||||
memoizedSnapshot = nextSnapshot;
|
||||
const nextSelection = selector(nextSnapshot);
|
||||
|
||||
// If a custom isEqual function is provided, use that to check if the data
|
||||
@@ -86,7 +87,6 @@ export function useSyncExternalStoreExtra<Snapshot, Selection>(
|
||||
return prevSelection;
|
||||
}
|
||||
|
||||
memoizedSnapshot = nextSnapshot;
|
||||
memoizedSelection = nextSelection;
|
||||
return nextSelection;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user