Skip to content

Release Candidate v2.0.0-rc.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@matei-radu matei-radu released this 24 Feb 15:08
· 24 commits to main since this release

This is the first RC for version 2 of this package.

Major (and breaking) changes

ReCaptcha now uses React Hooks, requires React ^16.8.0

The ReCaptcha component is no longer class-based. Instead, it now uses React Hooks. This simplifies the code a bit and it brings the code base to the "modern" era of React.

Consequently React 16.8.0 is the new minimum supported version, since it's the first release to support Hooks. This version was released more than 4 years ago, on February 6, 2019, so I think it is safe to make this transition.

The TypeScript compiler target changed from ES5 to ES2015

TypeScript now transpiles down to ES2015 instead of ES5, giving us simpler, smaller and more modern code. ES2015 has been around for more than 7 years and all modern browsers fully support it.

Complete list of changes

  • Change the compiler target from es5 to es2015 which has been round for 7+ years. It is time to move on.
  • Refactor ReCaptcha from class-based to functional component using React Hooks.
  • Change the minimum supported React version to 16.8.0, which is the first React version to introduce Hooks.
  • Refactor constants outside the ReCaptcha component.
  • Refactor some ReCaptcha methods as static functions outside the component.
  • Update Rollup configuration to be more type-safe.
  • Bump @rollup/plugin-node-resolve to version 15.0.1.
  • Bump @rollup/plugin-typescript to version 11.0.0.
  • Bump rollup to version 3.17.2.