So I have an app with an activity. The app checks for Internet connection at the beginning. If there are no Internet connection, it will show a screen with a button to refre
You can force update the component. Check this: https://reactjs.org/docs/react-component.html#forceupdate
It will re-render the component.
check this example:
class App extends Component{
constructor(){
super();
this.forceUpdateHandler = this.forceUpdateHandler.bind(this);
};
forceUpdateHandler(){
this.forceUpdate();
};
render(){
return(
Random Number : { Math.random() }
);
}
}
ReactDOM.render( , document.getElementById('app'));