(props: any, deps?: readonly any[])
| 61 | |
| 62 | /** @internal */ |
| 63 | export 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 | } |
searching dependent graphs…