Skip to content

Commit

Permalink
fix(react-refs): use callback refs instead of string refs
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Dec 15, 2024
1 parent 8a43fbc commit faf781b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions notes/Web/React/ReactBasicNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,10 @@ class UserInput extends Component {
this.input = input
}

componentDidMount() {
this.input.focus()
}

render() {
return (
<>
Expand Down

0 comments on commit faf781b

Please sign in to comment.