* A custom hook that composes multiple refs * Accepts callback refs and RefObject(s)
(...refs: PossibleRef<T>[])
| 27 | * Accepts callback refs and RefObject(s) |
| 28 | */ |
| 29 | function useComposedRefs<T>(...refs: PossibleRef<T>[]) { |
| 30 | // eslint-disable-next-line react-hooks/exhaustive-deps |
| 31 | return React.useCallback(composeRefs(...refs), refs) |
| 32 | } |
| 33 | |
| 34 | export { composeRefs, useComposedRefs } |
no test coverage detected
searching dependent graphs…