Skip to content

v3.0.0-beta.0

Pre-release
Pre-release

Choose a tag to compare

@ndresx ndresx released this 14 Jun 19:13
6b7a955

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 legacy count prop, and prop-types.
  • onComplete is now (timeDelta, completedOnStart).

Added

  • Public useCountdown hook (same render props as the component).
  • Subpath entries: react-countdown/component and react-countdown/hook.
  • resetKey (restart without remount) and freezeProps (opt out of prop tracking).
  • CountdownStatus enum 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