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

Function useSpringValue

packages/core/src/hooks/useSpringValue.ts:25–36  ·  view source on GitHub ↗
(
  initial: Exclude<T, object>,
  props?: SpringUpdate<T>
)

Source from the content-addressed store, hash-verified

23 * @public
24 */
25export const useSpringValue = <T>(
26 initial: Exclude<T, object>,
27 props?: SpringUpdate<T>
28) => {
29 const springValue = useConstant(() => new SpringValue(initial, props))
30
31 useOnce(() => () => {
32 springValue.stop()
33 })
34
35 return springValue
36}

Callers 3

DockFunction · 0.85
DockCardFunction · 0.85

Calls 3

useConstantFunction · 0.90
useOnceFunction · 0.90
stopMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…