diff --git a/notes/Web/React/ReactBasicNotes.md b/notes/Web/React/ReactBasicNotes.md index 1bc45976a2..2ef071ebcb 100644 --- a/notes/Web/React/ReactBasicNotes.md +++ b/notes/Web/React/ReactBasicNotes.md @@ -814,6 +814,10 @@ class UserInput extends Component { this.input = input } + componentDidMount() { + this.input.focus() + } + render() { return ( <>