-
-
Notifications
You must be signed in to change notification settings - Fork 204
WIP Rx state/connect partial obs and signals #1644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP Rx state/connect partial obs and signals #1644
Conversation
@hoebbelsB as we had the initial discussion you might want to check this PR. |
} | ||
return result; | ||
}), | ||
coalesceWith(timer(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the correct coalescing operator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is the correct operator, but why would you coalesce it on the next macrotask
? It makes much more sense to coalesce on microtask
instead. Also, it shouldn't trigger ngZone.
Please try with coalesceWith(from(Promise.resolve()))
and use the unpatched promise from the rx angular cdk.
We have to write tests though, that confirm RxState
is not running out of zone. That could potentially cause issues when state selections are running out of zone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, I think coalescing should happen before the mapping. This way, the mapping would be less often executed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes absolutely sense, will rework it soon
} | ||
}); | ||
|
||
return combineLatest(observables).pipe( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I filter out any partial which has a value of undefined?
Undefined might come from line 27
Hello @mikelgo anything I can help with? In order to move this PR forward? |
hey @eneajaho thanks for asking. |
WIP PR for #1632
Tests are still in WIP