This repository was archived by the owner on Dec 1, 2025. It is now read-only.
Release Candidate v2.0.0-rc.0
Pre-release
Pre-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
es5toes2015which has been round for 7+ years. It is time to move on. - Refactor
ReCaptchafrom 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
ReCaptchacomponent. - Refactor some
ReCaptchamethods as static functions outside the component. - Update Rollup configuration to be more type-safe.
- Bump
@rollup/plugin-node-resolveto version15.0.1. - Bump
@rollup/plugin-typescriptto version11.0.0. - Bump
rollupto version3.17.2.