Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
57 replies
Zion

submitting form results in page reload/url change t3+react-hook-form+shadcn

I'm trying to build a form using react hook form and shadcn form component, but it keeps reloading the page after submit and add the "?username=" to the url (which makes it ignore the validation since it just redirects the url), I copy pasted the same code as shadcn has on his website for testing, still does it, cant figure out the issue.
anyone knows how to fix it?
Solution
is there a reason you have void form.handleSubmit? pretty sure that should just be form.handleSubmit
Was this page helpful?