-
Notifications
You must be signed in to change notification settings - Fork 7
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
on keeping all the reducing functions on the store module aka stow
operator
#16
Comments
So every stream will be unplugged and (consequently) directly "usable"? I like it. (This assumes that everything we want to do in a reducer is a *Yes, maybe the name should be changed - it conflicts in weird ways with the Immutable API. |
Cool, yes, we can unpack a small set And, yes, I think it becomes clearer that |
The old "tree of life" way, agreed. Not sure about
For sure the observable chain maps to a value at the end, so For this reason, I am ok with your original example implementation, just let's not call it Another thing that comes to mind is adding another check to see if the passed argument is an observable, and merge it in that case, but I'm not sure it's really useful and probably will just try to do too much stuff. |
Question: should we also support
These are examples which are not cleanly solved with some data-massaging + a simple (One additional edge case would be a ordered-type's |
Cool. Sounds fun. :-) I think we should play with it a bit before we explode in APIs. But why not, if it turns out that we can cover all cases easily. |
This also forces us to think on some of our utils--- Newer version would still come in as steps on a |
That makes sense but I can't imagine it in code. If you have something, could you do a very-early-just-a-wip PR? |
So we won't have a
anymore. |
After your last comment, @cristiano-belloni , I'm having second thoughts about this approach. I guess one could be pragmatic---plug in simple streams into the store, but emit reducers in complex journeys. Can you imagine CC if we got all fundamentalist about this? It wouldn't help much, I think. But in some places it might. This is all to say: good point! I'm not sure about that. |
I guess that the good old solution of having reducer-emitting streams and split them if we need a more generic functionality wins in terms of flexibility. |
Or, the same but in other words: keep reducers on the store config unless
we need to compose the streams into more ... symphonic arrangements?
…On Fri, Feb 22, 2019 at 11:17 AM Cristiano Belloni ***@***.***> wrote:
I guess that the good old solution of having reducer-emitting streams and
split them if we need a more generic functionality wins in terms of
flexibility.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAF2qYmyV5mcYxBi2Te5a4zoUDPoew54ks5vP9HZgaJpZM4a-kl2>
.
|
So, in practice, we could have the |
(Emphasis mine.) @gabrielmontagne, this is why I love you and that brilliant mind of yours. |
@cristiano-belloni , I think so, yes. @mstade , good to see you in the neighbourhood :-) thinking out loud, the operator name could be |
stow
operator
+1 for the |
Will create a quick PR with the implementation above. No need to get fancier for the time being, I think. |
So far we've been ambivalent about where we should keep our final "to reducer" maps---whenever we need access to the "unplugged" stream we start exposing streams with ugly names like
rawLocation$
...But with the comfort of immutable and sweetness of pipeable operatos---thinking something like
... one can keep all merged streams on the store's
merge(
emitting "real" data. This allows them to be always routable. And we then can leave the final "but where on the state should this be plugged?" answers in one place: on thestore$
definition:The name of the operator is not great, and maybe it could be split into dumber versions (
update
,updateIn
), but how does it sound? @cristiano-belloni ?With these new RxJS+Immutable idioms and the state context, apps could get very very lean, I'm feeling. Hopefully not terribly magical, but only sensibly magical. And context wired router constructs is yet something we haven't considered.
The text was updated successfully, but these errors were encountered: