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
What do you want to import in the frontend? Just the generated types from "@prisma/client"?
Yes
Importing types should be safe. I have seen users creating a separate folder just for types and importing from this folder in the frontend.
Sounds good, thank you!
No worries