final-form / react-final-form-html5-validation

A swap-in replacement for 🏁 React Final Form's <Field> component to provide HTML5 Validation
MIT License
56 stars 8 forks source link

React 17 compatibility #27

Open MoltenCoffee opened 3 years ago

MoltenCoffee commented 3 years ago

bug report/feature request

What is the current behavior?

React 17 is not listed as a peerDependency, causing NPM to throw "could not resolve dependency" when using React 17.

What is the expected behavior?

As I believe this package is pefectly able to work under React 17, peerDependencies should be updated:

{
  "react": "^15.3.0 || ^16.0.0-0 || ^17.0.0",
  "react-dom": "^15.3.0 || ^16.0.0-0 || 17.0.0",
}

What's your environment?

Final form: 4.20.1 React-final-form: 6.5.2 React-final-form-html5-validation: 1.1.0

Node 15.2.0 NPM 7.0.8

sethreidnz commented 3 years ago

Bump? I was about to use this thinking it would be great. But it doesn't support the current version of React... Happy to contribute something if needed.

MoltenCoffee commented 3 years ago

I'm already using it myself in React 17 without problems, I really think it's just a peerDependency issue (with NPM 7 handling those differently).

Installing with NPM flag ---legacy-peerd-deps fixes errors thrown by NPM, but we shouldn't have to do that. React-final-form seems to have been updated 3 days ago, so I have hope this will be fixed soon as well.