v3.0.0-beta.0
Pre-release
Pre-release
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