Skip to content

Releases: ndresx/react-countdown

v3.0.0-beta.0

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

v2.3.6

Choose a tag to compare

@ndresx ndresx released this 10 Aug 10:37
4e76783

Bugfixes

  • #247: Removed the deprecated React.Props type.
  • #260: Replaced React.createRef to resolve peer dependency issue.

v2.3.5

Choose a tag to compare

@ndresx ndresx released this 23 Nov 21:45
c0252c2

Bugfixes

  • #222
    Fixes onComplete return type.

v2.3.4

Choose a tag to compare

@ndresx ndresx released this 16 Nov 21:59
6df039c

Bugfixes

  • Fixes #219
    The package's content of v2.3.3 didn't reflect the latest changes.

v2.3.3

Choose a tag to compare

@ndresx ndresx released this 22 Oct 14:09
bab6fe3

Changelog

  • Updates onComplete callback to consistently trigger, even when the countdown is completed on start. #169

Bugfixes

  • Fixes date prop typing (#212):
    The CountdownProps interface date prop was initially set to optional due to an older component that is still being supported in order to follow Semver (for react-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

Choose a tag to compare

@ndresx ndresx released this 08 May 19:34
d2d9b21

Bugfixes

  • Fixed component updates by only relying on the date prop anymore

v2.3.1

Choose a tag to compare

@ndresx ndresx released this 24 Oct 15:43
c909d97

Bugfixes

  • Fixed issue with onTick callback when in overtime

v2.3.0

Choose a tag to compare

@ndresx ndresx released this 13 Oct 18:18
21d1dc9

Changelog

  • Added feature to stop the countdown through the API
  • Added new feature props:
    • onStop callback
    • overtime which 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)

v2.2.2

Choose a tag to compare

@ndresx ndresx released this 04 Oct 16:22
91bc40f

Changelog

  • Added className prop support #92

Bugfixes

  • Fixed React import issue with TypeScript (fixes #90)

Misc

  • Added CONTRIBUTING.md
  • Fixed some types in README.md

v2.2.1

Choose a tag to compare

@ndresx ndresx released this 08 Feb 12:24
8bd2612

Changelog

  • Replaced deep equal with shallow comparator. #77