Browse Source

Link to relevant forwardRef docs (#2229)

main
Vincent 5 years ago
committed by GitHub
parent
commit
b4e7437ceb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/hooks-reference.md

2
content/docs/hooks-reference.md

@ -437,7 +437,7 @@ Keep in mind that `useRef` *doesn't* notify you when its content changes. Mutati
useImperativeHandle(ref, createHandle, [deps])
```
`useImperativeHandle` customizes the instance value that is exposed to parent components when using `ref`. As always, imperative code using refs should be avoided in most cases. `useImperativeHandle` should be used with `forwardRef`:
`useImperativeHandle` customizes the instance value that is exposed to parent components when using `ref`. As always, imperative code using refs should be avoided in most cases. `useImperativeHandle` should be used with [`forwardRef`](/docs/react-api.html#reactforwardref):
```js
function FancyInput(props, ref) {

Loading…
Cancel
Save