In your render function:{ this.state.showTheThing && <TextInput/>}
Then just do:
this.setState({showTheThing: true}) // to show it this.setState({showTheThing: false}) // to hide it
In your render function:{ this.state.showTheThing && <TextInput/>}
Then just do:
this.setState({showTheThing: true}) // to show it this.setState({showTheThing: false}) // to hide it
转载于:https://www.cnblogs.com/chiy/p/6514544.html