MCPcopy
hub / github.com/pmndrs/react-spring / detachRefs

Function detachRefs

packages/core/src/helpers.ts:215–218  ·  view source on GitHub ↗
(ctrl: Controller, ref?: SpringRef)

Source from the content-addressed store, hash-verified

213
214/** Detach `ctrl` from `ctrl.ref` and (optionally) the given `ref` */
215export function detachRefs(ctrl: Controller, ref?: SpringRef) {
216 ctrl.ref?.delete(ctrl)
217 ref?.delete(ctrl)
218}
219
220/** Replace `ctrl.ref` with the given `ref` (if defined) */
221export function replaceRef(ctrl: Controller, ref?: SpringRef) {

Callers 2

useSpringsFunction · 0.90
useTransitionFunction · 0.90

Calls 1

deleteMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…