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

Function useSpring

packages/core/src/hooks/useSpring.ts:63–71  ·  view source on GitHub ↗
(props: any, deps?: readonly any[])

Source from the content-addressed store, hash-verified

61
62/** @internal */
63export function useSpring(props: any, deps?: readonly any[]) {
64 const isFn = is.fun(props)
65 const [[values], ref] = useSprings(
66 1,
67 isFn ? props : [props],
68 isFn ? deps || [] : deps
69 )
70 return isFn || arguments.length == 2 ? [values, ref] : values
71}

Callers 15

ChildFunction · 0.90
TestFunction · 0.90
scenarioFunction · 0.90
SpringFunction · 0.90
useScrollFunction · 0.90
useInViewFunction · 0.90
useResizeFunction · 0.90
useSpring.test.tsxFile · 0.90
ComponentFunction · 0.90
scenarioFunction · 0.90
ComponentFunction · 0.90
LogoFunction · 0.85

Calls 1

useSpringsFunction · 0.90

Tested by 4

ChildFunction · 0.72
TestFunction · 0.72
ComponentFunction · 0.72
ComponentFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…