Browse Source

docs: Unify identifiers in "useImperativeHandle" example (#2590)

The example was using `inputRef` while the description used `fancyInputRef`. This was irritating.
main
Gregor Adams 5 years ago
committed by Alexey Pyltsyn
parent
commit
32a5db034b
  1. 2
      content/docs/hooks-reference.md

2
content/docs/hooks-reference.md

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

Loading…
Cancel
Save