Package Exports
- @react-hook/merged-ref
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@react-hook/merged-ref) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@react-hook/merged-ref
A React hook for merging multiple refs into one ref
Installation
npm i merged-ref
yarn add merged-ref
Usage
import React from 'react'
import useMergedRef from '@react-hook/merged-ref'
const F = React.forwardRef((props, ref) => {
const otherRef = React.useRef(null)
const multiRef = useMergedRef(ref, otherRef)
return <div ref={multiRef} />
})
LICENSE
MIT