Replies: 1 comment
-
Can you share more code related to this? Is there something else calling useEffect(() => {
console.log({selectedClient})
}, [selectedClient]) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Afternoon all.
I have a simple form in nextjs, as seen below. Shadcn + react-hook-form is used, and i'm trying to set an object into state.
The issue is that on setting state in the select handler, it sets then seemingly renders again, setting
selectedClient
back to undefined.I'm sure this isn't an issue with shadcn or radix, so does anybody have an idea of what i'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions