Replies: 2 comments
-
Hooks are reusable. You're free to write: (AsyncSnapshot<T>, void Function(Future<void>),) useMutation<T>() {
final pendingFuture = useState<Future<void>?>(null):
final snapshot = useFuture(pendingFuture.value);
return (snapshot, (future) => pendingFuture.value = future);
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have used this example form Riverpod docs
https://riverpod.dev/docs/essentials/side_effects#going-further-showing-a-spinner--error-handling
is there a way to combine
in one value notifier
Beta Was this translation helpful? Give feedback.
All reactions