Skip to content
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

redux-saga generator vs store-saga observable : Code readibility #12

Open
ksachdeva opened this issue Apr 8, 2016 · 0 comments
Open

Comments

@ksachdeva
Copy link

Hi,

I am relatively a beginner in redux concept and regarding sagas just a day old so apologies in advanced if the questions does not make sense.

I see two threads going on - an effort to implement redux concept using RxJS (seems to be an okay strategy on surface .. however multiple implementation on github) and also create ecosystem of helpers & middleware that are also based on Observable.

redux-saga is an approach to separate the side effects ... in simple words make Actions very simple and not pollute them with call to (async) remote services.This library/middleware requires usage of es6 generator functions.

store-saga also wants to achieve the same functionality however it makes use of RxJS library.

When I look at various code examples, IMHO I found the yield (i.e. generator approach) to be more readable. Again this kind of stuff is subjective. For me chained sequences of observable are bit harder to reason (may be it is for me only and have to use RxJS more ...)

That said, one of the problem with redux-saga are the generators :) as they are making me go through two transpliation steps - first typescript and then babel.

Would appreciate if you could share your opinion on readability of code in two approaches and also provide insight if RxJS approach is more performant or less performant than that of redux-saga.

Regards & thanks
Kapil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant