Closed dalgard closed 7 years ago
You can control version of your sagas or rocks in your app.
Is "rocks" slang for Rx observables?
This doesn't really answer my question. Why are they peer dependencies? If I decide to use either, I will simply add them as dependencies to my own project, just like redux-elm
should add them as dependencies to it.
I think @zetoke made the point albeit didn't explain it properly.
None of them are dependencies since technically you don't even need to use them, unless you want to use Sagas (redux-saga
/ rxjs
). Generally if you are developing a library, you want to give a user full control over installed dependencies, so that we don't restrict user to have installed two versions just because redux-elm
enforces different version than their application.
Is "rocks" slang for Rx observables?
@dalgard sorry, my fault. It does not slang. Auto-correction on my phone has corrected from rxjs
to rocks
:disappointed:
@tomkis1 Thanks. So it comes down to avoiding an extra version. It's unfortunate that it shows up as a warning in the console, since it gives the impression that I'm doing something wrong, even when I don't need the two libs.
@zetoke It kinda makes sense as a slang word, though :)
@dalgard well actually, you should install those two dependencies to avoid the warning, because either way sooner or later you will get to the point when sagas come handy ;-)
No doubt – I would argue that any real-world app need a saga. Communicating correctly is important, though.
Avoiding the bundling of two different versions of the same package in one app is probably something that should be done manually when optimizing the bundle size, anyway?
I'm thinking that the peer dependency feature isn't used all the time for a good reason.
Also, what about RxJS? I probably won't be using observables in my app, however great they are.
So what do you suggest @dalgard should we put redux-saga
and redux-saga-rxjs
in dependencies instead?
Only if they are actually used somewhere in redux-elm
.
I can't figure out what relationship redux-elm
have to these two libraries – the contents of this folder puzzles me.
Maybe, but I'd still prefer to give user a chance to choose the right version of redux-saga
and rxjs
because they will most likely have these libraries already and the last thing we want is same library in different versions.
How come
redux-saga
andrxjs
are peer dependencies ofredux-elm
?If the latter imports the former somewhere in the code, shouldn't they just be regular dependencies?