argcast
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
Man.. I'm so rusty on react 😓
15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
So destructuring it at first and then good to go! 🙂
15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
ok, just trpc is sending the result inside the
data
value of the object so the correct way is:
15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
but with the await it is complaining:
Unexpected
await
of a non-Promise (non-"Thenable") value. [@typescript-eslint/await-thenable]
'await' has no effect on the type of this expression15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
Good question, testing it. I thinkg if I do not await it ts won't know the types later on to do for example a .map ?
15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
Damn, I'm so stupid. This is the correct code:
15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/15/2024 in #questions
'use client' with tRPC? Type error: This expression is not callable
I am not sure if I am not following a best practices
15 replies