using prisma with next 13 app dir

I have just started exploring prisma and next 13. I have read on the Prisma official website, "React Server Components are currently an experimental feature and are not yet ready for production usage! We are collaborating with the React team to ensure that the react-prisma package will be kept up-to-date". But, I can import the PrismaClient from @prisma/client in the page.ts(without 'use client'; so I hope it's a server component) and something like const posts= await prisma.posts.findMany() works. I might need to understand a lot of concepts better here. Is this the right way to use prisma inside the next 13 app directory. This way, I can skip rest/graphql/trpc for a significant portion of the web app(and also improve SEO/lighthouse metrics I guess).
1 Reply
esponges
esponges17mo ago
Yeah, I'm guessing how the context would also work. Prefetching queries would be so sweet like now it's possible with createProxySSGHelpers