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

Method onLoopReset

packages/core/src/Controller.ts:266–272  ·  view source on GitHub ↗

* Subscribe to loop iteration restarts on this controller. Returns an * unsubscribe function. Listeners fire synchronously inside `flushUpdate` * just before the next iteration is dispatched. * @internal

(fn: () => void)

Source from the content-addressed store, hash-verified

264 * @internal
265 */
266 onLoopReset(fn: () => void): () => void {
267 const set = (this._onLoopReset ??= new Set())
268 set.add(fn)
269 return () => {
270 set.delete(fn)
271 }
272 }
273
274 /** @internal Called at the end of every animation frame */
275 protected _onFrame() {

Callers 1

useTrailFunction · 0.80

Calls 2

addMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected