useForkRef
About
A hook that can combine two refs(mutable or callbackRefs) into a single callbackRef
Examples
Arguments
Argument value | Type | Description |
---|---|---|
ref2 | Callback/Mutable ref | First ref |
ref1 | Callback/Mutable ref | Second ref |
Returns
Return value | Type | Description | Default value |
---|---|---|---|
ref | Callback ref | A callback ref function that can internally combines both the refs from the arguments | () => null |
Original source
Note: Credit of this hook goes to material-ui