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

Method start

packages/core/src/SpringValue.ts:466–481  ·  view source on GitHub ↗
(to?: any, arg2?: any)

Source from the content-addressed store, hash-verified

464 start(to: T, props?: SpringProps<T>): AsyncResult<this>
465
466 start(to?: any, arg2?: any) {
467 let queue: SpringUpdate<T>[]
468 if (!is.und(to)) {
469 queue = [is.obj(to) ? to : { ...arg2, to }]
470 } else {
471 queue = this.queue || []
472 this.queue = []
473 }
474
475 return Promise.all(
476 queue.map(props => {
477 const up = this._update(props)
478 return up
479 })
480 ).then(results => getCombinedResult(this, results))
481 }
482
483 /**
484 * Stop the current animation, and cancel any delayed updates.

Callers 13

constructorMethod · 0.95
describeToPropFunction · 0.95
describeFromPropFunction · 0.95
describeResetPropFunction · 0.95
describeDefaultPropFunction · 0.95
describeReversePropFunction · 0.95
describeImmediatePropFunction · 0.95
describeConfigPropFunction · 0.95
describeLoopPropFunction · 0.95
describeDelayPropFunction · 0.95
describeEventsFunction · 0.95
describeMethodsFunction · 0.95

Calls 2

_updateMethod · 0.95
getCombinedResultFunction · 0.90

Tested by 12

describeToPropFunction · 0.76
describeFromPropFunction · 0.76
describeResetPropFunction · 0.76
describeDefaultPropFunction · 0.76
describeReversePropFunction · 0.76
describeImmediatePropFunction · 0.76
describeConfigPropFunction · 0.76
describeLoopPropFunction · 0.76
describeDelayPropFunction · 0.76
describeEventsFunction · 0.76
describeMethodsFunction · 0.76
describeGlobalsFunction · 0.76