Adding trpc.useQuery hook to Next.js page with react-hook-form prevents stateful refresh. #5637
tombburnell
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm new to tRPC so apologies if I've worded this poorly.
In my NextJS app, I've got a a form managed by react-hook-form, Yup and SWR.
I'm trying to migrate over to tRPC and Zod so I've been following the examples.
I noticed that stateful refresh was no longer working once I'd added tRPC to the page - form details are no longer retained when making code changes. I found that by removing the line with trpc it started working again.
Why would this be happening and is there a workaround?
I'm using Next 13.5 with Pages router and tRPC 11-next-beta.300.
Many thanks, Tom
Beta Was this translation helpful? Give feedback.
All reactions