react-prisma
TypeScript icon, indicating that this package has built-in type declarations

5.1.2 • Public • Published

react-prisma

⚠️ Warning: This package is now deprecated.

When react-prisma package was introduced, it made it easier to use Prisma in React Server Components (RSC). This approach is not needed anymore, thanks to all the changes that the React Team made in React Server Components since.

Note: At the time of deprecation (August 1st, 2023), RSC are:

  • only available in Next.js framework (the App Router must be used).
  • coming soon to Redwood.js framework.

Resources on how to use RSC today

Legacy README

This package allows using Prisma Client in a React Server Component. It is a thin wrapper around @prisma/client.

⚠️ Warning: This is highly experimental. Don't use this in any real application We just publish this early for demonstration purposes. Its release cycle does not follow SemVer, which means we might release breaking changes (change APIs, remove functionality) without any prior warning.

This is unstable

We don't guarantee that this works. Any moment the underlying react api can change and break this package.

Known limitations

Right now this package does not support:

  • query chaining, like:
prisma.user.findUnique({ where: { id: 42 } }).posts()
  • mutations, only findMany, findFirst, findOne, findUnique, count operations are allowed.

Readme

Keywords

none

Package Sidebar

Install

npm i react-prisma

Weekly Downloads

21

Version

5.1.2

License

Apache-2.0

Unpacked Size

18 kB

Total Files

5

Last publish

Collaborators

  • jolg42
  • sevinf
  • apolanc
  • pirix-gh
  • janpio
  • prismabot