MCPcopy
hub / github.com/facebook/react / createCache

Function createCache

packages/react-reconciler/src/ReactFiberCacheComponent.js:82–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80// for retaining the cache once it is in use (retainCache), and releasing the cache
81// once it is no longer needed (releaseCache).
82export function createCache(): Cache {
83 return {
84 controller: new AbortControllerLocal(),
85 data: new Map(),
86 refCount: 0,
87 };
88}
89
90export function retainCache(cache: Cache) {
91 if (__DEV__) {

Callers 3

createFiberRootFunction · 0.90
switchFunction · 0.90
requestCacheFromPoolFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected