Y
Hacker News
new
|
ask
|
show
|
jobs
by
Octoth0rpe
2160 days ago
I believe the useRef hook is used for this problem:
https://reactjs.org/docs/hooks-reference.html#useref
The example even uses .focus()