From 2c443d3f33d9d9f4d00ed1e99a8b092597abce97 Mon Sep 17 00:00:00 2001 From: MAZE Date: Thu, 23 Nov 2023 17:09:22 +0330 Subject: [PATCH] fix: rehydrate store only on mount --- src/components/store-consumer/store-consumer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/store-consumer/store-consumer.tsx b/src/components/store-consumer/store-consumer.tsx index eb90381..5f70e67 100644 --- a/src/components/store-consumer/store-consumer.tsx +++ b/src/components/store-consumer/store-consumer.tsx @@ -9,7 +9,7 @@ interface StoreConsumerProps { export function StoreConsumer({ children }: StoreConsumerProps) { useEffect(() => { useSoundStore.persist.rehydrate(); - }); + }, []); return <>{children}; }