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

Remove @fabrix-framework/fabrix/rhf export #20

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IzumiSy
Copy link
Member

@IzumiSy IzumiSy commented Oct 10, 2024

Fabrix internally uses react-hook-form to manage form states and was exposing @fabrix-framework/fabrix/rhf to provider users with the same version of react-hook-form. This is a adhoc workaround toward the behaviour that useController hook in component registries does not access the same version of react-hook-form that fabrix internally mounts as FormProvider.

However, I found that adding react-hook-form a peer dependency also works out. Exposing RHF from fabrix was a bit clumsy, so this PR is a fix for that.

@IzumiSy IzumiSy self-assigned this Oct 10, 2024
@IzumiSy IzumiSy requested a review from a team as a code owner October 10, 2024 06:54
@@ -37,7 +33,8 @@
"peerDependencies": {
"graphql": "^16",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"react-hook-form": "^7"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added RHF here

@IzumiSy IzumiSy force-pushed the remove_rhf_package branch from 2d951b7 to 738dba1 Compare October 10, 2024 08:56
@IzumiSy IzumiSy marked this pull request as draft October 11, 2024 00:01
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.

1 participant