Avoid unnecessary use of useAction
solely for action status
#120
Unanswered
socketlink
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, there's a reliance on
useAction
to solely retrieve the status of an action. This approach leads to a situation where the toast is displayed prematurely, before the action is completed, necessitating the need to await the action.Is there an alternative method to obtain the action status without resorting to
useAction
?I attempted to use action.result.data.failure, but encountered the issue of the promise still being in progress.
Any insights or suggestions on a more efficient approach would be greatly appreciated.
Thanks in advance for your assistance. It's possible that I might be overlooking something, so any additional guidance or insights would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions