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
class MyScreen extends Component {
constructor(props) {
super(props)
this.state = {
lastRefresh: Date(Date.now()).toString(),
}
this.refreshScreen = this.refreshScreen.bind(this)
}
refreshScreen() {
this.setState({ lastRefresh: Date(Date.now()).toString() })
}
render() {
return (
My Screen
Last Refresh: {this.state.lastRefresh}
)
}
}
// also put in main View Date(Date.now())