The React.useState() hook lets us take the advantage of state in functional components. The value provided in the brackets is the default value of the state.
Counter value: 0