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

Does not work with react-hook-form in auto mode #1032

Open
1 task done
EmmettM opened this issue May 12, 2024 · 4 comments
Open
1 task done

Does not work with react-hook-form in auto mode #1032

EmmettM opened this issue May 12, 2024 · 4 comments

Comments

@EmmettM
Copy link

EmmettM commented May 12, 2024

What version of million are you using?

3.0.6

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

When using Million and react-hook-form, form state does not update on input.

Adding //million-ignore fixes the issue, so it's Million.

What's the expected result?

The form state should be in line with the input values

Link to Minimal Reproducible Example

https://stackblitz.com/edit/vitejs-vite-47doxe?file=src%2FApp.tsx

Participation

  • I am willing to submit a pull request for this issue.
Copy link

Thanks for opening this issue! A maintainer will review it soon.

@tobySolutions
Copy link
Contributor

Thank you for sharing this. The team is actively working to knock out things like these in the upcoming release 😁. Thank you!!

@barrcodes
Copy link

barrcodes commented May 28, 2024

I'm also having issues, but mine are slightly different. When I open the form, I get Error: Invalid hook call. Hooks can only be called inside of the body of a function component. in the component code of one of my form fields. I've attempted // million-ignore at the top of the file, but it appears to have no effect. I have also tried to exclude all files related to the form via the million plugin filter config.

million 3.1.6
@million/lint 1.0.0-rc.12

This appears to be lint related, as it works fine when I remove the linter from my config.

@vadolasi
Copy link

vadolasi commented Jun 5, 2024

Same where

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

No branches or pull requests

4 participants