Skip to content

Commit b922860

Browse files
committed
chore: remove useless comment
1 parent 69d2e54 commit b922860

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/hooks/useGlobalCache.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ export default function useGlobalCache<CacheType>(
6262

6363
// Remove if no need anymore
6464
useInsertionEffect(() => {
65-
// It's bad to call build again in effect.
66-
// But we have to do this since StrictMode will call effect twice
67-
// which will clear cache on the first time.
6865
buildCache(([times, cache]) => [times + 1, cache]);
6966
onCacheEffect?.(cacheContent);
7067

@@ -74,15 +71,6 @@ export default function useGlobalCache<CacheType>(
7471
const nextCount = times - 1;
7572

7673
if (nextCount === 0) {
77-
// // Always remove styles in useEffect callback
78-
// register(() => {
79-
// // With polyfill, registered callback will always be called synchronously
80-
// // But without polyfill, it will be called in effect clean up,
81-
// // And by that time this cache is cleaned up.
82-
// if (!globalCache.opGet(fullPathStr)) {
83-
// onCacheRemove?.(cache, false);
84-
// }
85-
// });
8674
onCacheRemove?.(cache, false);
8775
return null;
8876
}

0 commit comments

Comments
 (0)