Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RHF-MUI to be compatible with MUI v6 #303

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Conversation

beverloo
Copy link
Contributor

@beverloo beverloo commented Sep 1, 2024

The PR was validated by (successfully) linting and building all targets, and comparing the storybook with the published version having found no visual or behavioural differences. Since no code changes were necessary this might not even need a new major release :)

There are two notable changes from the migration guide that have not been adopted yet:
https://mui.com/material-ui/migration/upgrade-to-v6/

  • RHF-MUI still targets ES5, but with MUI dropping support for IE 11 upping the build target to something more modern is worth considering.
  • MUI v6 is (forward) compatible with the upcoming React 19 release as well, however I have not tested this for RHF-MUI.

When a MUI X dependency is used (i.e. @mui/x-date-pickers) then, when wanting to use it together with MUI v6, the minimum version is MUI X v7.15 as that adds the peer dependency allowance. However, since it still supports v5 as well, I did not update the minimum MUI X version in package.json.

Fixes #273

The PR was validated by (successfully) linting and building all targets,
and comparing the storybook with the published version having found no
visual or behavioural differences. Since no code changes were necessary
this might not even need a new major release :)

There are two notable changes from the migration guide that have not
been adopted yet:
https://mui.com/material-ui/migration/upgrade-to-v6/

- RHF-MUI still targets ES5, but with MUI dropping support for IE 11
  upping the build target to something more modern is worth considering.
- MUI v6 is (forward) compatible with the upcoming React 19 release as
  well, however I have not tested this for RHF-MUI.

When a MUI X dependency is used (i.e. @mui/x-date-pickers) then, when
wanting to use it together with MUI v6, the minimum version is MUI X
v7.15 as that adds the peer dependency allowance. However, since it
still supports v5 as well, I did not update the minimum MUI X version
in package.json.

Fixes dohomi#273
Copy link

vercel bot commented Sep 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-hook-form-material-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 1, 2024 4:08pm

@beverloo
Copy link
Contributor Author

beverloo commented Sep 1, 2024

Please take a look! I think I've built and tested everything I can in the library, however a double check would definitely be appreciated.

I had expected that code changes would've been necessary, but there were none. There are a number of deprecations in v6 that RHF-MUI is subject to, particularly moving to slots for e.g. InputProps, but adopting those won't be required until at least v7.

@dohomi dohomi merged commit 70e4d22 into dohomi:master Sep 2, 2024
2 checks passed
@dohomi
Copy link
Owner

dohomi commented Sep 2, 2024

@beverloo thanks for taking your time I published 7.1.0 with the compatibility for MUI v6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

do you have plan to upgrade this package to use MUI V6 when available?
2 participants