Get loading state from server action without using `useFormStatus` or `useFormState`
I like doing mutations with server actions because I don't have to write API routes and they remove the boilerplate of tRPC.
But.
Is there a way to get a loading state inside your component if i don't want to use the recommended experimental hooks?
It leads to making my my own custom hook the exports a
isLoading
variable, which leads to believe I should just react query's useMutation
to wrap the server action call just so I can the helpful isLoading
and isError
0 Replies