Calling trpc mutations on client components with app router
Hello, looking for some help learning app router, any advice greatly appreciated
I'm getting an error trying to call a mutation from a client component - my aim is to collect some values with a form in a shadcn dialog (so useState required)
Setting up the mutations for create and edit:
Mutating onSubmit function:
Specific error is in the screenshot, I assume I'm just doing the client component trpc pattern wrong, but not really sure what a correct call would look like
I'm getting an error trying to call a mutation from a client component - my aim is to collect some values with a form in a shadcn dialog (so useState required)
Setting up the mutations for create and edit:
Mutating onSubmit function:
Specific error is in the screenshot, I assume I'm just doing the client component trpc pattern wrong, but not really sure what a correct call would look like
Solution
GitHub
Modulation Podcast Website. Contribute to hyhydev/Modulation development by creating an account on GitHub.