P
Prisma4mo 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
Nurul4mo ago
What do you want to import in the frontend? Just the generated types from "@prisma/client"?
Zaid
Zaid4mo ago
Yes
Nurul
Nurul4mo 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
Zaid4mo ago
Sounds good, thank you!
Nurul
Nurul4mo ago
No worries
Want results from more Discord servers?
Add your server