Keysight Technologies interview question

How do you design a clock or implement a stopwatch using react.