Skip to main content

Introduction

next-safe-action is a library that takes full advantage of the latest and greatest Next.js, React and TypeScript features, using validation libraries of your choice, to let you define type safe Server Actions and execute them inside React Components.

How does it work?

Like magic. 🪄

Features

  • ✅ Pretty simple
  • ✅ End-to-end type safety
  • ✅ Form Actions support
  • ✅ Powerful middleware system
  • ✅ Input validation using multiple validation libraries
  • ✅ Advanced server error handling
  • ✅ Optimistic updates