* A utility to compose multiple refs together * Accepts callback refs and RefObject(s)
(...refs: PossibleRef<T>[])
| 19 | * Accepts callback refs and RefObject(s) |
| 20 | */ |
| 21 | function composeRefs<T>(...refs: PossibleRef<T>[]) { |
| 22 | return (node: T) => refs.forEach(ref => setRef(ref, node)) |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * A custom hook that composes multiple refs |
no test coverage detected
searching dependent graphs…