Amazon interview question

Create a counter button using react