react-timer-and-stopwatch
Advanced tools
Comparing version 0.6.0 to 0.6.1
{ | ||
"name": "react-timer-and-stopwatch", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A countdown timer and stopwatch hook for React", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -148,8 +148,9 @@ # React Timer and Stopwatch hook | ||
<button onClick={togglePause} disabled={!timerIsPaused}>Toggle Pause</button> | ||
<button onClick={resetTimer}>Reset Timer</button> | ||
<button onClick={() => resetTimer()}>Reset Timer</button> | ||
</> | ||
); | ||
} | ||
``` | ||
**resetTimer** can reset the timer/stopwatch with the original options if no parameter is included, or you can include an options object in the first optional parameter (`adjustedOptions`) to either adjust the old options or replace the old options entirely. If you want to replace them, set the second optional parameter (`replaceOptions`) to true and be sure to include a new `create` object on your new options object. | ||
``` | ||
There are also functions to add and subtract time from the current timer/stopwatch. These are **addTime** and **subtractTime**. Both take either a number of milliseconds or alternatively a [time object](#terminology). | ||
@@ -156,0 +157,0 @@ #### Example |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
333775
288