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

Method start

packages/core/src/Controller.ts:190–204  ·  view source on GitHub ↗

* Start the queued animations for every spring, and resolve the returned * promise once all queued animations have finished or been cancelled. * * When you pass a queue (instead of nothing), that queue is used instead of * the queued animations added with the `update` method, which are l

(props?: OneOrMore<ControllerUpdate<State>> | null)

Source from the content-addressed store, hash-verified

188 * the queued animations added with the `update` method, which are left alone.
189 */
190 start(props?: OneOrMore<ControllerUpdate<State>> | null): AsyncResult<this> {
191 let { queue } = this as any
192 if (props) {
193 queue = toArray<any>(props).map(createUpdate)
194 } else {
195 this.queue = []
196 }
197
198 if (this._flush) {
199 return this._flush(this, queue)
200 }
201
202 prepareKeys(this, queue)
203 return flushUpdateQueue(this, queue)
204 }
205
206 /** Stop all animations. */
207 stop(): this

Callers 3

constructorMethod · 0.95
pauseMethod · 0.95
resumeMethod · 0.95

Calls 3

toArrayFunction · 0.90
prepareKeysFunction · 0.85
flushUpdateQueueFunction · 0.85

Tested by

no test coverage detected