ABC Engineering interview question

Explain counter using react js.