constructor() { super(); this.state ={ status:true } } render() { return( { this.state.status === true ? this.hideView()}> Ok Fine :) : Ok Fine. } ); } hideView(){ this.setState({ home:!this.state.status }); }