Releases: ndresx/react-countdown
Releases · ndresx/react-countdown
Release list
v3.0.0-beta.0
Full rewrite of the internals: all countdown logic now lives in a framework-agnostic CountdownJs engine, with React as a thin adapter over a new public useCountdown hook. <Countdown /> is built on that hook, so component and hook share one lifecycle.
Ships dual ESM + CJS with bundled types, sideEffects: false, and targets React 18+. Changes are relative to 2.3.6.
Breaking
- Requires React 18+ (adapter uses
useSyncExternalStore). - Ref API moved:
ref.current.getApi()→ref.current.api. - Removed
className,children, the legacycountprop, andprop-types. onCompleteis now(timeDelta, completedOnStart).
Added
- Public
useCountdownhook (same render props as the component). - Subpath entries:
react-countdown/componentandreact-countdown/hook. resetKey(restart without remount) andfreezeProps(opt out of prop tracking).CountdownStatusenum export +getStatus()+refresh()API methods.
Toolchain
- Updated all dev deps to latest: Jest 30, TypeScript 6, Cypress 15, Rollup 4.62, plugin bumps.
What's Changed
Full Changelog: v2.3.6...v3.0.0-beta.0
v2.3.6
v2.3.5
v2.3.4
v2.3.3
Changelog
- Updates
onCompletecallback to consistently trigger, even when the countdown is completed on start. #169
Bugfixes
- Fixes
dateprop typing (#212):
TheCountdownPropsinterfacedateprop was initially set to optional due to an older component that is still being supported in order to follow Semver (forreact-countdown@2). This change will make it a required one. However, since this legacy version was neither utilizing TypeScript nor PropTypes, it's safe to assume that this won't break anything given that the actual countdown component only works by providing this prop while it's also documented this way.
v2.3.2
v2.3.1
v2.3.0
Changelog
- Added feature to
stopthe countdown through the API - Added new feature props:
onStopcallbackovertimewhich allows the countdown to become negative (resolves #94)
- Extended the API with the following functions:
stop()isStarted()isStopped()
- Updated API usage example
Bugfixes
- Fixed and revised countdown status management (fixes #97)
Misc
- Added E2E Testing with Cypress
- Updated
README.md(fixes #51)