Package Exports
- apply-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 (apply-ref) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
apply-ref
Apply React refs
Install
yarn add apply-ref
Usage
import applyRef, { applyRefs } from 'apply-ref'
let ref1 = val => {/*...*/}
let ref2 = React.createRef()
<div ref={applyRefs(ref1, ref2)} />
// OR
<div ref={(val) => {
applyRef(ref1, val)
applyRef(ref2, val)
someOtherHandler(val)
}} />