Utility to merge different React “refs” into a single call.
npm install @quid/merge-refsmerge-refs is a little utility used to call different
React ["refs"][react-refs] all at once.
It can be especially useful if you are using two or more libraries
that need a reference of the same React component.
``bash
npm install --save @quid/merge-refs
yarn add @quid/merge-refs
`
A typical use case is:
`jsx static
import mergeRefs from '@quid/merge-refs';
{({ ref, style }) => (
{ref2 => (
content
)}
)}
`
Or, with React hooks:
`jsx static
import mergeRefs from '@quid/merge-refs';
const ref1 = useRef(null);
const ref2 = useRef(null);
[react-refs]: https://reactjs.org/docs/refs-and-the-dom.html