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

Function Component

packages/core/src/hooks/useTransition.test.tsx:225–241  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223 let enterSpring: any = null
224
225 function Component() {
226 useSpring({ ref: springRef, from: { x: 0 }, to: { x: 1 } })
227 const transition = toArray(
228 useTransition(true, {
229 ref: transRef,
230 from: { n: 0 },
231 enter: { n: 1 },
232 leave: { n: 0 },
233 })
234 )[0]
235 transition(style => {
236 enterSpring = style.n
237 return null
238 })
239 useChain([springRef, transRef])
240 return null
241 }
242
243 await render(<Component />)
244

Callers

nothing calls this directly

Calls 4

useSpringFunction · 0.90
toArrayFunction · 0.90
useTransitionFunction · 0.90
useChainFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…