From 5f046151e197f9608c603a0f0a7724f568c039a2 Mon Sep 17 00:00:00 2001 From: Les Szklanny Date: Fri, 15 Jan 2021 15:43:32 -0600 Subject: [PATCH] fix(hydration): useMemo -> useEffect (#1643) --- src/hydration/react.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hydration/react.tsx b/src/hydration/react.tsx index bd9971dbcc..29eaff6fdd 100644 --- a/src/hydration/react.tsx +++ b/src/hydration/react.tsx @@ -11,8 +11,8 @@ export function useHydrate(state: unknown, options?: HydrateOptions) { // Running hydrate again with the same queries is safe, // it wont overwrite or initialize existing queries, - // relying on useMemo here is only a performance optimization - React.useMemo(() => { + // relying on useEffect here is only a performance optimization + React.useEffect(() => { if (state) { hydrate(queryClient, state, optionsRef.current) }