Skip to content

Commit

Permalink
Merge pull request #24 from TheEdoRan/experimental
Browse files Browse the repository at this point in the history
Upgrade library to version 4
  • Loading branch information
TheEdoRan authored Oct 5, 2023
2 parents 79fad63 + abbac57 commit 4c8e752
Show file tree
Hide file tree
Showing 67 changed files with 23,113 additions and 10,299 deletions.
51 changes: 46 additions & 5 deletions README.md
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.
Binary file added assets/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4c8e752

Please sign in to comment.