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

Function useOnce

packages/shared/src/hooks/useOnce.ts:4–4  ·  view source on GitHub ↗
(effect: EffectCallback)

Source from the content-addressed store, hash-verified

2import { useEffect, EffectCallback } from 'react'
3
4export const useOnce = (effect: EffectCallback) => useEffect(effect, emptyDeps)
5
6const emptyDeps: any[] = []

Callers 5

useSpringValueFunction · 0.90
useSpringsFunction · 0.90
useTransitionFunction · 0.90
index.tsxFile · 0.90
withAnimatedFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…