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

Function prepareSprings

packages/core/src/Controller.ts:566–577  ·  view source on GitHub ↗

* Ensure spring objects exist for each defined key. * * Using the `props`, the `Animated` node of each `SpringValue` may * be created or updated.

(
  springs: SpringValues,
  props: ControllerQueue[number],
  create: (key: string) => SpringValue
)

Source from the content-addressed store, hash-verified

564 * be created or updated.
565 */
566function prepareSprings(
567 springs: SpringValues,
568 props: ControllerQueue[number],
569 create: (key: string) => SpringValue
570) {
571 if (props.keys) {
572 each(props.keys, key => {
573 const spring = springs[key] || (springs[key] = create(key))
574 spring['_prepareNode'](props)
575 })
576 }
577}
578
579/**
580 * Ensure spring objects exist for each defined key, and attach the

Callers 2

getSpringsFunction · 0.85
prepareKeysFunction · 0.85

Calls 1

eachFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…