The state definition of the selected category must be defined outside of the CategorySelect component to utilize the react-hook-form library, which is used by shadcn/ui internally.
Criteria
Instead of defining the following state within the CategorySelect component, modify it to receive them as props from a parent component.
Description
The state definition of the selected category must be defined outside of the
CategorySelect
component to utilize thereact-hook-form
library, which is used byshadcn/ui
internally.Criteria
Instead of defining the following state within the
CategorySelect
component, modify it to receive them as props from a parent component.Notes
-