TheEdoRan / next-safe-action

Type safe and validated Server Actions in your Next.js project.
https://next-safe-action.dev
MIT License
2.29k stars 35 forks source link

fix(hooks): add `isTransitioning` and `isPending` shorthand statuses to return object #230

Closed TheEdoRan closed 3 months ago

TheEdoRan commented 3 months ago

Proposed changes

This PR introduces a workaround for the issues described in #227, by adding isTransitioning and isPending shorthand statuses to the hooks return object. isTransitioning is the value returned from the useTransition hook that is used under the hood, while isPending has the value of isExecuting || isTransitioning, for convenience.

Related issue(s) or discussion(s)

re #227

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-safe-action-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2024 4:14pm
next-safe-action-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2024 4:14pm
github-actions[bot] commented 3 months ago

:tada: This PR is included in version 7.6.1-beta.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: