AsyncQueuer: consider adding onStart callback for when an item transitions from pending to active #206
sasha-morozov
started this conversation in
Ideas
Replies: 0 comments
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.
-
Noticed that
AsyncQueuerhas per-item callbacks for every post-execution outcome -onSuccess,onError, andonSettled, but there doesn't seem to be an equivalent for when an item begins executing. The only way to observe that moment today is throughonItemsChange, which fires at the queue level on any mutation.Would it make sense to add, for instance, an
onStartcallback that fires just before an item transitions from pending to active - similar to how TanStack Query'suseMutationdoes withonMutatecallback? E.g.onStart?: (item: TValue, queuer: AsyncQueuer<TValue>) => void- consistent with the existing callback signatures.Or is there a reason this wasn't included?
Beta Was this translation helpful? Give feedback.
All reactions