I have a screen in my React Native application in which I have few text fields.
I was wondering if there is any way in which on screen load my keyword opens automati
The selected solution did not work for me due to stack navigation (see comment of "SoundStage" on selected solution)
I added a new variable openTheKeyboard
to the state initially set to false
.
My hacky solution:
componentDidMount() {
this.setState({ openTheKeyboard: true });
}
componentDidUpdate() {
if (this.state.openTheKeyboard) {
this.textInput.focus();
this.setState({ openTheKeyboard: false });
}
}