P
Prisma5mo ago
Zaid

Safe to import Prisma in Client Component?

I was wondering if it's safe to import Prisma (namespace) from @prisma/client in a client component with the "use client" directive. Using NextJS btw.
5 Replies
Nurul
Nurul5mo ago
What do you want to import in the frontend? Just the generated types from "@prisma/client"?
Zaid
ZaidOP5mo ago
Yes
Nurul
Nurul5mo ago
Importing types should be safe. I have seen users creating a separate folder just for types and importing from this folder in the frontend.
Zaid
ZaidOP5mo ago
Sounds good, thank you!
Nurul
Nurul5mo ago
No worries
Want results from more Discord servers?
Add your server