-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from TheEdoRan/experimental
Upgrade library to version 4
- Loading branch information
Showing
67 changed files
with
23,113 additions
and
10,299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,49 @@ | ||
# [next-safe-action](https://github.com/TheEdoRan/next-safe-action) | ||
<div align="center"> | ||
<img src="assets/logo.png" alt="next-safe-action logo" width="36" height="36"> | ||
<a href="https://github.com/TheEdoRan/next-safe-action"><h1>next-safe-action</h1></a> | ||
</div> | ||
|
||
> `next-safe-action` is a library that takes full advantage of the latest and greatest Next.js, React and TypeScript features, using Zod, to let you define typesafe actions on the server and call them from Client Components. | ||
> next-safe-action is a library that takes full advantage of the latest and greatest Next.js, React and TypeScript features, using Zod, to let you define typesafe Server Actions and execute them inside Client Components. | ||
## Take a look at: | ||
- [next-safe-action](packages/next-safe-action) - Library code and documentation | ||
## How does it work? | ||
|
||
- [example-app](packages/example-app) - A basic implementation of the library | ||
Like magic. 🪄 | ||
|
||
<div align="center"> | ||
<img src="./assets/demo.gif"/> | ||
</div> | ||
|
||
## Features | ||
|
||
- ✅ Pretty simple | ||
- ✅ End-to-end type safety | ||
- ✅ Context based clients (with middlewares) | ||
- ✅ Input validation using Zod | ||
- ✅ Advanced server error handling | ||
- ✅ Optimistic updates | ||
|
||
## Documentation | ||
|
||
**Explore the documentation for version 4 of the library on [next-safe-action website](https://next-safe-action.dev).** ✨ | ||
|
||
If you are looking for old versions documentation, check out: | ||
- the [README_v3](packages/next-safe-action/README_v3.md) file for version 3.x.x. | ||
- the [README_v2](packages/next-safe-action/README_v2.md) file for version 2.x.x. | ||
|
||
## Migration guide | ||
|
||
Version 4.x.x of the library introduced some breaking changes to the API. Please check out the [v3 to v4 migration guide](https://next-safe-action.dev/docs/migration-from-v3-to-v4) on the website for more information. | ||
|
||
## Example | ||
|
||
You can find a basic working implementation of the library [here](packages/example-app). | ||
|
||
## Contributing | ||
|
||
If you want to contribute to next-safe-action, the best way is to fork this repository and [open a pull request](https://github.com/TheEdoRan/next-safe-action/pulls) when you're done implementing your feature. | ||
|
||
If you found bugs or just want to ask a question, feel free to [open an issue](https://github.com/TheEdoRan/next-safe-action/issues). | ||
|
||
## License | ||
|
||
next-safe-action is released under the MIT license. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.