I was trying to implement Stopwatch app with React. Everything is implemented and looks like it is working right now. But, when I clicked stop button and then start button again, the result of NaN is shown on the page. Is there any idea to fix this issue?

I think that I should change the data type from String to Number at some points. I tried to use Number() to fix the issue, but it didn't work.

```js
import React from "react";
import { render } from "react-dom";

class Stopwatch extends React.Component {
  constructor(props) {
    super(props);

    this.state = {
      startTime: 0,
      elapsedTime: 0,
      timerId: null,
      isRunning: false,
      timeToAdd: 0
    };
  }

  updateTimerText = () => {
    const m = Math.floor(this.state.elapsedTime / 60000);
    const s = Math.floor((this.state.elapsedTime % 60000) / 1000);

    this.setState({
      elapsedTime: m + ":" + s
    });
  };

  countUp = () => {
    this.setState({
      timerId: setTimeout(() => {
        // this.state.elapsedTime = Date.now() - this.state.startTime;
        this.setState({
          elapsedTime: Date.now() - this.state.startTime + this.state.timeToAdd
        });
        this.updateTimerText();
        this.countUp();
      }, 100)
    });

    this.state.timerId;
  };

  handleStart = () => {
    if (this.state.isRunning === true) {
      return;
    }
    this.setState({
      isRunning: true
    });
    this.setState({
      startTime: Date.now()
    });
    this.countUp();
  };

  handleStop = () => {
    if (this.state.isRunning === false) {
      return;
    }
    this.setState({
      isRunning: false
    });
    this.setState({
      timeToAdd: this.timeToAdd + (Date.now() - this.state.startTime)
    });
    clearTimeout(this.state.timerId);
  };

  handleReset = () => {
    if (this.state.isRunning === true) {
      return;
    }
    this.setState({
      elapsedTime: 0
    });
  };

  render() {
    return (
      <div>
        <div>{this.state.elapsedTime}</div>

        <button onClick={this.handleStart}>Start</button>

        <button onClick={this.handleStop}>Stop</button>

        <button onClick={this.handleReset}>Reset</button>
      </div>
    );
  }
}

render(<Stopwatch />, document.getElementById("root"));
```