mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Link to relevant forwardRef docs (#2229)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user