Skip to content

Commit 972f8df

Browse files
authored
Merge pull request #39 from erikras-gilfoyle-agent/update-react-peerdeps
fix: align react-dom peerDependency with react version range
2 parents cabd244 + b8056d9 commit 972f8df

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ yarn add react-final-form-html5-validation react-final-form final-form
3535

3636
[![Edit 🏁 React Final Form - HTML5 Validation Example](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/14r018yjp4)
3737

38+
## React Compatibility
39+
40+
This library supports React 16.8+ (with Hooks), React 17, React 18, and React 19.
41+
42+
**Supported versions:**
43+
- React 16.8.0 or higher
44+
- React 17.x
45+
- React 18.x
46+
- React 19.x
47+
48+
**Note:** CI currently tests against React 18.x. While the library is compatible with React 16.8+, 17.x, and 19.x based on the peer dependency declaration, full automated test coverage across all versions is not yet implemented.
49+
3850
## Usage
3951

4052
The way you specify rules and error messages in HTML5 is by giving first a rule prop, e.g. `required`, `min`, `maxLength`, and then an error message prop, e.g. `valueMissing`, `rangeUnderflow`, or `tooLong`, respectively. This library comes with built-in English defaults for the error messages, but you will probably want to override those by passing in your own.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"peerDependencies": {
9393
"final-form": ">=5.0.0",
9494
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
95-
"react-dom": "^18.2.0",
95+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
9696
"react-final-form": ">=7.0.0"
9797
},
9898
"jest": {

0 commit comments

Comments
 (0)