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
From boiler
npx create-t3-app@latest
using the app router:
On simple tRPC file src/server/api/routers/test.ts
:
On src/server/api/root.ts
:
And when calling it from src/app/page.tsx
I have no issues at all. But when I do call it from a component in _components
folder that has a 'use client' directive it gives me this error. I don't understand since it is the same code replication already available on the boilerplate on the _components/create-post.tsx
. So basically:
Error:
15 replies
TTCTheo's Typesafe Cult
•Created by argcast on 5/10/2024 in #questions
Next.js Script tag breaking my app
Working on a simple app to implement Office add-in via next-js. The thing is when I try to route between pages using the
<Link>
tag from Next.js, if there is a <Script>
present it just breaks my app. Script tag is placed on app/layout.tsx:
And the simple app/page.tsx
:
The error:
Console:
Any indea on what might be happening?2 replies