Prisma Singleton in Next.js
Hi, I used the Prisma docs (https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/nextjs-prisma-client-dev-practices) to setup and tested it. In my Next application, I observed the fact that, whenever I navigate between pages, the globalThis is reset, expected one time the Prisma client to be instantiated and used across all the app, but this was not the case.
Am I doing something wrong? Does NextJS initiate Prisma on each page?
Thank you
This is a question I got from one of my students in my new course where I didn't know the definitive answer.
Am I doing something wrong? Does NextJS initiate Prisma on each page?
Thank you
This is a question I got from one of my students in my new course where I didn't know the definitive answer.
Best practice for instantiating Prisma Client with Next.js
