Fix:
- 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
Breaking Changes:
- IE is not longer supported
autoResetKey
props has been deprecated.shouldUseToLocaleString
and the whole setup to use the built-intoLocaleString
out of the box has been deprecated. The same result can be achieved using theformatter
function.- React PropTypes has been removed as well as the
prop-types
peer-dependency. The component and hook will rely on the TypeScript types. prefix
andsuffix
props has been deprecated. The same result can be achieved just by adding them to in front and behind the value.
New features:
updateInterval
prop now determines how often the animated value will change. When set to 0 the value will update on each key frame (default behavior).onUpdate
callback will be fired with the current animated value when it changes.
Implemented enhancements:
- bundle size is now even further reduced
esbuild
is now used to bundle the code- example folder is added, which can be used for testing the hook and component
Implemented enhancements:
- chore: upgrade dependencies
Implemented enhancements:
- feat: add list of supported browsers to package.json
Implemented enhancements:
- chore: Add renovate to the repo
- chore: Update all packages
Implemented enhancements:
- chore: upgrade rollup and rollup-terser packages
Implemented enhancements:
- feat: use Rollup instead of Webpack to bundle the package, which enables ES module bundles.
Implemented enhancements:
- chore: update list of keywords in package.json
Big fix:
- fix: upgrade use-elapsed-time to 2.1.4 which fixes an issue where pausing the animation once it is completed, resetting the timer and playing again it did not work.
Implemented enhancements:
- fix: upgrade
use-elapsed-time
package to v2.1.3 which replacesuseLayoutEffect
withuseEffect
when the environment is node for SSR and removes side effects fromuseState
so React.StrictMode works as expected in development
Big fix:
- fix: fix an issue where rounding numbers with bitwise shifting
number | 0
caused the last number to jump
Big fix:
- Upgrade use-elapsed-time dependency to v 2.1.2, which fixes and issue with reset method that takes none number values
Implemented enhancements:
- The default decimal places count is not determined based on the maximum number of decimal places in
start
andend
. The decimal places count is also used intoLocaleString
Breaking Changes
- The hook now returns an object with two props:
value
andreset
.value
is the current count up value;reset
is a method that reset the animation when it is fired - The hook now accepts a single object as an argument with all props to configure the animation.
Implemented enhancements:
- The library exports also Count up component. The component is using the hook internally.
- Support
toLocaleString
with fallback options - Add bunch of props to configure the output value
- Rewrite the source code using TypeScript
- Support React Native
Minor changes:
- Update TypeScript type definitions
Minor changes:
- Update Readme
Implemented enhancements:
- Add TypeScript type definitions
Minor changes:
- Update .gitignore, .npmignore and Readme
Implemented enhancements:
- Init the project with simple hook and returns the count up value