mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 12:43:05 +00:00
docs: Unify identifiers in "useImperativeHandle" example (#2590)
The example was using `inputRef` while the description used `fancyInputRef`. This was irritating.
This commit is contained in:
committed by
Alexey Pyltsyn
parent
99b7901887
commit
32a5db034b
@@ -450,7 +450,7 @@ function FancyInput(props, ref) {
|
||||
FancyInput = forwardRef(FancyInput);
|
||||
```
|
||||
|
||||
In this example, a parent component that renders `<FancyInput ref={fancyInputRef} />` would be able to call `fancyInputRef.current.focus()`.
|
||||
In this example, a parent component that renders `<FancyInput ref={inputRef} />` would be able to call `inputRef.current.focus()`.
|
||||
|
||||
### `useLayoutEffect` {#uselayouteffect}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user