File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed
Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments