React Native 隐藏组件思路

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

posted on 2017-03-07 14:23  炽焰摩羯  阅读(264)  评论(0编辑  收藏  举报

导航