MCPcopy Create free account
hub / github.com/editablejs/editable / useComposedRefs

Function useComposedRefs

packages/ui/src/compose-refs.ts:29–32  ·  view source on GitHub ↗

* A custom hook that composes multiple refs * Accepts callback refs and RefObject(s)

(...refs: PossibleRef<T>[])

Source from the content-addressed store, hash-verified

27 * Accepts callback refs and RefObject(s)
28 */
29function useComposedRefs<T>(...refs: PossibleRef<T>[]) {
30 // eslint-disable-next-line react-hooks/exhaustive-deps
31 return React.useCallback(composeRefs(...refs), refs)
32}
33
34export { composeRefs, useComposedRefs }

Callers 9

PresenceFunction · 0.90
popper.tsxFile · 0.90
switch.tsxFile · 0.90
scroll-area.tsxFile · 0.90
popover.tsxFile · 0.90
createCollectionFunction · 0.90
menu.tsxFile · 0.90
TableComponentFunction · 0.90

Calls 1

composeRefsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…