In your rendering method, you can define conventions like the one below. For example, you can test your connection using the componentDidMount method, and then set your details.
render(){ if(this.state.isConnected == 'Online' ) return this.webView(); else return this.renderAnotherView(); }
source share