useMergedRef

Merge several refs, callback or object, into one.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

One element is read by two refs.

APIs

useMergedRef

const useMergedRef = <T>(...refs: (Ref<T> | undefined)[]) =>
  (node: T | null) => void
Edit this page on GitHub