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
Controller doesn't work with nextjs #1094
Comments
try to comment out the above code and see if the errors goes away. |
I was able to repro this issue as well, it looks like the issue was introduced somewhere between RHF v4.9.6 and v4.9.8. It does work (for me) w/ 4.9.6. |
oh thanks @gordysc I will investigate on this issue. can you share a simple codesandbox with nextjs? |
I shouldn't work with CRA as well, it's strange... I am sure there is something that I have broked. |
@bluebill1049 sure! I've created a basic repo to show the issue: Note: If you change |
thanks @gordysc i will take a look at during lunchtime or tonight. |
Looks like 4.9.7 is okay too, so the bug seems to have been introduced in 4.9.8. |
Thanks @sdornan I think I know the root cause of this one, will try to send out a beta version for the fix when I am arriving at the office. |
can you guys plz help test this one: react-hook-form@4.9.9-beta.1? |
Works great for me! I imagine you tested this against my repo though, so would be interested to hear if it works for others. Thanks for the super fast turn around! |
no worries @gordysc. one more confirm i will merge the PR, i will probably release this fix over the weekend, cause i have merge a new feature last weekend, need a bit more testing on it before let it out. |
Thanks, works great for me! |
Thanks @StKostyantin will release the minor version this weekend. |
I use antd and the same example works fine with create-react-app, but nextjs crashes.
For easier code reuse, I wrote my module for the form to connect antd and react-hook-form
Sample code for using normal inputs in my module:
This is how I use this code in creating a form:
And I see such an error:
Right now I'm using "next": "^ 9.2.2" and "react-hook-form": "^ 4.9.8"
The text was updated successfully, but these errors were encountered: