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

0.2.3 • Public • Published

zsa

zsa is a library for building typesafe server actions in Next.js. It provides a simple, scalable developer experience with features like validated inputs/outputs, procedures (middleware) for passing context to server actions, and React Query integration for querying server actions in client components.

Installation

Install zsa using your preferred package manager:

npm i zsa zsa-react zsa-react-query zsa-openapi zod

Features

  • Validated inputs and outputs using Zod schemas
  • Procedures for adding context and authorization to server actions
  • Callbacks for running additional logic based on server action lifecycle
  • Built-in loading states and error handling
  • React Query integration for querying server actions on the client side
  • Support for FormData as input type
  • Retry functionality and timeouts for server actions
  • TypeScript support for a fully typesafe experience

Documentation

View the full documentation and examples on zsa.vercel.app.

Support

If you need help with anything, feel free to DM (@ido_pesok) on X.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.33,477latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.33,477
0.2.2667
0.2.113
0.2.013
0.1.928
0.1.81
0.1.70
0.1.60
0.1.5145
0.1.41
0.1.31
0.1.20
0.1.11
0.1.00
0.0.10
0.0.00

Package Sidebar

Install

npm i zsa-react

Weekly Downloads

4,347

Version

0.2.3

License

MIT

Unpacked Size

32.6 kB

Total Files

6

Last publish

Collaborators

  • idopesok
  • wconvery