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
Remember by calling setState function on your component, you can refresh it. if there's a button that's going to refresh the page, i would do this:
calling setState will update your component no matter what you object you pass to it. I'm not sure if re-rendering page, calls componentDidMount function, so maybe you need to move your API calls to some funciton func and call this function in your componentDidMount, and also after each button press event. example:
componentDidMount() {
apiCalls()
}
apiCalls() {
.... // your code
this.setState({dummy: 1})
}
render() {
...
...
}