I\'m really new to React Native and I\'m wondering how can I hide/show a component.
Here\'s my test case:
Hide And Show parent view of Activity Indicator
constructor(props) {
super(props)
this.state = {
isHidden: false
}
}
Hide and Show as Follow
{
this.state.isHidden ? : null
}
Full reference
render() {
return (
this.setState({firstName: text.text})}/>
this.setState({lastName: text.text})}/>
this.setState({email: text.text})}/>
this.setState({phone: text.text})}/>
this.setState({password: text.text})}/>
{
this.state.isHidden ? : null
}
);
}
On Button presss set state as follow
onSignupPress() {
this.setState({isHidden: true})
}
When you need to hide
this.setState({isHidden: false})