Proposal
I suggest to extend allSettled api like this:
const scope = fork()
allSettled(scope) // Promise, which will be resolved, once there is no pending calculations in this scope
Use case
In some cases there is a need to track, if there are pending effects (like requests) before some action - e.g. before route transition
Something like this:
const onLinkClick = () => {
allSettled(currentScope).then(() => {
router.push(...)
})
}
Proposal
I suggest to extend
allSettledapi like this:Use case
In some cases there is a need to track, if there are pending effects (like requests) before some action - e.g. before route transition
Something like this: