Closed zombieJ closed 1 year ago
Origin counter is increased in useMemo and clear in useEffect.
useMemo
useEffect
In Suspense mode, component may call useMemo multiple times, which may not align with useEffect times. Let's all move counter into useEffect instead.
😠Deploy PR Preview 2f973eecba97e22c9e7c90957acef5947b79de05 failed. Build logs
🤖 By surge-preview
Origin counter is increased in
useMemo
and clear inuseEffect
.In Suspense mode, component may call
useMemo
multiple times, which may not align withuseEffect
times. Let's all move counter intouseEffect
instead.