react-use-stopwatch
A React Stopwatch Hook
Installation
npm install react-hook-stopwatchyarn add react-hook-stopwatch
Usage
; const Stopwatch = { const time format start stop reset = ; return <div> // Stopwatch Outputs <strong>time</strong> <strong>format</strong> // Stopwatch Inputs <button onClick= >Start</button> <button onClick= >Stop</button> <button onClick= >Reset</button> </div> ;};
Output: 87660 // MillisecondsOutput: 00:01:27.66 // HH:mm:ss:ms