Skip to content

Commit ecdf734

Browse files
committed
Comment
1 parent 231b3f2 commit ecdf734

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react/src/ReactCache.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ function createCacheRoot<T>(): WeakMap<Function | Object, CacheNode<T>> {
4545

4646
function createCacheNode<T>(): CacheNode<T> {
4747
return {
48-
s: UNTERMINATED,
49-
v: undefined,
50-
o: null,
51-
p: null,
48+
s: UNTERMINATED, // status, represents whether the cached computation returned a value or threw an error
49+
v: undefined, // value, either the cached result or an error, depending on s
50+
o: null, // object cache, a WeakMap where non-primitive arguments are stored
51+
p: null, // primitive cache, a regular Map where primitive arguments are stored.
5252
};
5353
}
5454

0 commit comments

Comments
 (0)