Skip to content

Commit 5f04615

Browse files
fix(hydration): useMemo -> useEffect (TanStack#1643)
1 parent e9208b2 commit 5f04615

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hydration/react.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export function useHydrate(state: unknown, options?: HydrateOptions) {
1111

1212
// Running hydrate again with the same queries is safe,
1313
// it wont overwrite or initialize existing queries,
14-
// relying on useMemo here is only a performance optimization
15-
React.useMemo(() => {
14+
// relying on useEffect here is only a performance optimization
15+
React.useEffect(() => {
1616
if (state) {
1717
hydrate(queryClient, state, optionsRef.current)
1818
}

0 commit comments

Comments
 (0)