How do I fix this query, I was following a tutorial that doesn't use the t3 stack
I'm trying to replicate this query (shown below) into t3 stack but the "onSuccess" property doesn't match and I don't know what I should change to make this work
This is the error:
This is the client code where I call the query in
3 Replies
I tried to replicate it into this query, but then nextjs gives me an error because i use "use client" in the same place where I put the query in, and apparently nextjs does allow use Client in a parent function of a server component which is and I don't know how to fix this either.
And this is the procedure from which I am calling from:
You're using the vanilla client not trpc/react
+ if you're using a Server-Component in a Clientcomponent, all the data for the Server Component needs to be available on the request.
Means you must pass the server component from a server component as a child to the client component. Like this:
// server rendered page.tsx
...
return
<ClientComponent whatEverProps={...someData}>
<ServerRenderedChildComponent optionalData={...someData} />
</ClientComponent>