0

In ReactJS I created an analogue clock as a component that updates every second using: -

componentDidMount () {
    setInterval(()=> {
      this.setClock()
    }, 1000)
  }

I also have a component that updates on page load with random names. Since I have added the analogue clock on an interval timer, everything that would reload on refresh/page load is updating every second. How do I render my other components only on initial page load?

Merman
  • 1
  • 1

0 Answers0