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

Function setSprings

packages/core/src/Controller.ts:539–549  ·  view source on GitHub ↗
(
  ctrl: Controller<Lookup<any>>,
  springs: SpringValues<UnknownProps>
)

Source from the content-addressed store, hash-verified

537 * whose key is not already in use.
538 */
539export function setSprings(
540 ctrl: Controller<Lookup<any>>,
541 springs: SpringValues<UnknownProps>
542) {
543 eachProp(springs, (spring, key) => {
544 if (!ctrl.springs[key]) {
545 ctrl.springs[key] = spring
546 addFluidObserver(spring, ctrl)
547 }
548 })
549}
550
551function createSpring(key: string, observer?: FluidObserver<FrameValue.Event>) {
552 const spring = new SpringValue()

Callers 2

flushFunction · 0.90
getSpringsFunction · 0.85

Calls 2

eachPropFunction · 0.90
addFluidObserverFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…