To understand componentDidMount, we are going to create a Pomodoro Timer (if you don't know what it is you can read this: https://en.wikipedia.org/wiki/Pomodoro_Technique).
Our Pomodoro timer will look like this:
Creating our Pomodoro Timer:
- The first thing we need to do is to create a new folder called Pomodoro in our components directory, as well as a file called Timer.js and the CSS file, Timer.css. This is the skeleton of the class component we will use for this component:
import React, { Component } from 'react';import './Timer.css';class Timer extends Component {