Skip to content

Commit ac0bdad

Browse files
committed
fix: upgrade use-elapsed-time to fix an issue with reset
1 parent bfbffa1 commit ac0bdad

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22

3-
## 3.0.0 ( ---- , 2021)
3+
## 3.0.1 (September 5th, 2021)
4+
5+
**Fix:**
6+
7+
- upgraded `use-elapsed-time` to 3.0.2, which fixes an issue where reset method was taking any kind of value as newStartAt value. Not it checks if the value provided is a number
8+
9+
## 3.0.0 ( September 5th , 2021)
410

511
**Breaking Changes:**
612

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "use-count-up",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "React/React Native component and hook to animate counting up or down to a number",
55
"main": "./lib/index.js",
66
"module": "./lib/index.module.js",
@@ -51,7 +51,7 @@
5151
},
5252
"homepage": "https://github.com/vydimitrov/use-count-up#readme",
5353
"dependencies": {
54-
"use-elapsed-time": "3.0.1"
54+
"use-elapsed-time": "3.0.2"
5555
},
5656
"peerDependencies": {
5757
"react": ">=16.8.0"

src/types.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
ReturnValue as ETReturnValue,
3-
Props as ETProps,
4-
} from 'use-elapsed-time'
1+
import { Props as ETProps } from 'use-elapsed-time'
52

63
export type ReturnValue = number | string | React.ReactNode
74

@@ -17,7 +14,7 @@ export interface ReturnProps {
1714
/** Current value of the count up animation */
1815
value: ReturnValue
1916
/** Method to start over the animation*/
20-
reset: ETReturnValue['reset']
17+
reset: () => void
2118
}
2219

2320
export interface Props {
@@ -42,7 +39,7 @@ export interface Props {
4239
/** Function that formats the output value */
4340
formatter?: (value: number) => ReturnValue
4441
/** Update interval in seconds. Determines how often the animated value will change. When set to 0 the value will update on each key frame. Default: 0 */
45-
updateInterval?: ETProps['updateInterval']
42+
updateInterval?: number
4643
/** On value update event handler. It receives the current value */
4744
onUpdate?: (value: ReturnValue) => void
4845
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,10 +2988,10 @@ urlgrey@1.0.0:
29882988
dependencies:
29892989
fast-url-parser "^1.1.3"
29902990

2991-
use-elapsed-time@3.0.1:
2992-
version "3.0.1"
2993-
resolved "https://registry.yarnpkg.com/use-elapsed-time/-/use-elapsed-time-3.0.1.tgz#43e562d711a1779580bb7548e14619c4dcfacfa1"
2994-
integrity sha512-Z83sKnBukVIgKYQFP1xgXgL5m9OPAkJ3bw2U9ghdemsdR3Z1Ju0Mco7SPVbgcNIJ2VJgZB/nurFouDOCC4P7Ag==
2991+
use-elapsed-time@3.0.2:
2992+
version "3.0.2"
2993+
resolved "https://registry.yarnpkg.com/use-elapsed-time/-/use-elapsed-time-3.0.2.tgz#ef22bf520e60f9873fd102925a2d5cbc5d4faaf5"
2994+
integrity sha512-2EY9lJ5DWbAvT8wWiEp6Ztnl46DjXz2j78uhWbXaz/bg3OfpbgVucCAlcN8Bih6hTJfFTdVYX9L6ySMn5py/wQ==
29952995

29962996
uuid@^8.0.0:
29972997
version "8.3.2"

0 commit comments

Comments
 (0)