Socket
Book a DemoInstallSign in
Socket

next-safe-action

Package Overview
Dependencies
Maintainers
1
Versions
290
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-safe-action

Type safe and validated Server Actions in your Next.js project.

8.0.11
latest
Source
npmnpm
Version published
Weekly downloads
81K
9.16%
Maintainers
1
Weekly downloads
 
Created
Source
next-safe-action logo

next-safe-action

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

Features

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

Documentation

Explore the documentation for the current stable version of the library on the next-safe-action v8 website.

Looking for v7 docs?

You can keep using version 6 and eventually upgrade to version 7. Check out the v7 documentation here.

Migrate from v7 to v8

Check out the v7 to v8 migration guide to learn how to update your code for v8.

Installation

npm i next-safe-action

Playground

You can find a basic working implementation of the library here.

Sponsors

A big shout-out to all our sponsors! You’re the driving force behind this library's growth, and we're truly grateful for your support. ❤️

🥉 Enthusiasts (Bronze)

ArcJet
ArcJet

☕ Supporters

Pontus Abrahamsson
Pontus Abrahamsson

👷 Past sponsors

Vercel
Vercel
Liam Murray
Liam Murray
David Chalifoux
David Chalifoux
Rein Undheim
Rein Undheim
Merthan Merter
Merthan Merter
Marco Moroni
Marco Moroni
Gustavo Felisberto
Gustavo Felisberto
Robin Wieruch
Robin Wieruch

Contributing

If you want to contribute to next-safe-action, please check out the contributing guide.

If you found bugs or just want to ask a question, feel free to open an issue or a discussion by following the issue templates.

Contributors

Made with contrib.rocks.

License

next-safe-action is released under the MIT License.

Keywords

next

FAQs

Package last updated on 01 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.