Replies: 1 comment 1 reply
-
The Also, if you do this: let toast = useToast();
let data = useActionData<typeof clientAction>(); You don't really need a clientAction, just use your server action and call toast in an effect. Also calling |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks for the clientAction, now I can use client-side code easily like toast.
But code is a bit too much when your client-side code requires Function calls to do the job.
For example
useToast
from Chakra UI.This is painful.
Suggestion
How about create a new API
useClientActionData
?Beta Was this translation helpful? Give feedback.
All reactions