Getting Started
So you're like me and you love Server Actions, but you need more Zod and TypeScript!
Why Use This Library?
- Server action validation with
zod-form-data
(opens in a new tab) - Server error handling
- Amazing TypeScript DX
- Doesn't break
useActionState
progressive enhancement (opens in a new tab) - No dependencies other then
zod
/zod-form-data
Why React 19+ is required
This library is designed to enhance useActionState
, which requires React 19. Without that, you really won't get much benefit from this library.
I have only tested with Next.js for now, but the goal is to make this work with React in general.
Installation
Ensure you have React 19 and Next.js 15 setup (instructions (opens in a new tab)).
npm install -S better-react-server-actions zod zod-form-data