MCPcopy
hub / github.com/thebuilder/react-intersection-observer / stopObserving

Function stopObserving

src/useOnInView.tsx:124–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 );
123
124 function stopObserving() {
125 // Centralized teardown so both manual destroys and React ref updates share
126 // the same cleanup path (needed for React versions that never call the ref with `null`).
127 if (destroyed) return;
128 destroyed = true;
129 destroyObserver();
130 observedElementRef.current = null;
131 observerCleanupRef.current = undefined;
132 lastInViewRef.current = undefined;
133 }
134
135 observerCleanupRef.current = stopObserving;
136

Callers 1

useOnInViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…