Answers for "how to refresh page once in javascript react"

12

how to refresh the page using react

window.location.reload(false);
Posted by: Guest on February-24-2020
1

react refresh page every second

componentDidMount() {
  this.interval = setInterval(() => this.setState({ time: Date.now() }), 1000);
}
componentWillUnmount() {
  clearInterval(this.interval);
}
Posted by: Guest on May-25-2020

Code answers related to "how to refresh page once in javascript react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language