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:
Gregor Adams
2019-11-26 21:44:34 +01:00
committed by Alexey Pyltsyn
parent 99b7901887
commit 32a5db034b

View File

@@ -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}