JavaScript React Components Stateful Components and Lifecycle Methods Update the Stopwatch State with componentDidMount()

setInterval() inside componentDidMount()

Why you would run a timer function inside componentDidMount()? This way, the function is constantly running in the background, even if start wasn't clicked. Wouldn't that be a bad practice for larger application? Or is it just being used here to show us how componentDidMount() works?