File tree Expand file tree Collapse file tree 3 files changed +248
-165
lines changed
packages/react-dom-bindings/src/client Expand file tree Collapse file tree 3 files changed +248
-165
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ const internalEventHandlerListenersKey = '__reactListeners$' + randomKey;
48
48
const internalEventHandlesSetKey = '__reactHandles$' + randomKey ;
49
49
const internalRootNodeResourcesKey = '__reactResources$' + randomKey ;
50
50
const internalHoistableMarker = '__reactMarker$' + randomKey ;
51
+ const internalCachedMarker = '__reactCacheMarker$' + randomKey ;
51
52
52
53
export function detachDeletedInstance ( node : Instance ) : void {
53
54
// TODO: This function is only called on host components. I don't think all of
@@ -296,6 +297,14 @@ export function markNodeAsHoistable(node: Node) {
296
297
( node : any ) [ internalHoistableMarker ] = true ;
297
298
}
298
299
300
+ export function isMarkedCached ( node : Node ) : boolean {
301
+ return ! ! ( node : any ) [ internalCachedMarker ] ;
302
+ }
303
+
304
+ export function markNodeAsCached ( node : Node ) {
305
+ ( node : any ) [ internalCachedMarker ] = true ;
306
+ }
307
+
299
308
export function isOwnedInstance ( node : Node ) : boolean {
300
309
return ! ! (
301
310
( node : any ) [ internalHoistableMarker ] || ( node : any ) [ internalInstanceKey ]
You can’t perform that action at this time.
0 commit comments