ant-design / cssinjs

https://ant-design.github.io/cssinjs
MIT License
236 stars 59 forks source link

fix: Suspense will make cache counter not sync #120

Closed zombieJ closed 1 year ago

zombieJ commented 1 year ago

Origin counter is increased in useMemo and clear in 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.

github-actions[bot] commented 1 year ago

😭 Deploy PR Preview 2f973eecba97e22c9e7c90957acef5947b79de05 failed. Build logs

🤖 By surge-preview