-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add redux saga #106
add redux saga #106
Conversation
Sorry for being late on this. Any chance you can take a pull and solve merge conflict?. Happy to merge after that! |
@somus you just need to update your repository and then do git push origin master --force and ready, |
Just noticed redux sagas breaks during server-side rendering since there are no promises returned from the fetch actions. I checked redux-saga repo, server rendering is not quite there yet. 🙁 But there are some ideas in this redux-saga/redux-saga#13. I will try to implement it. |
Just my two cents but as a huge fan of this project, I don't think this should be merged to master. Reason is plain Redux has a significantly easier barrier to entry for newcomers, and Saga is largely complex abstraction that is not necessary and does not provide any substantial improvements over the current architecture. I've shipped multiple production level Redux apps and even I cannot wrap my head around sagas, nor have I needed to. Also saying "fixes #97" is a bit of a smoke screen as it is not really an issue, its one person's request. |
@jforaker Thanks for the input. What are you saying makes sense. Redux saga is quite complex. To keep the project beginner friendly, it is better not to add sagas. Do you think it is a better idea to have a separate project forked from mern for advanced users? |
I would believe that we can handle mern-cli flags and if a project would be interesting for advanced users but this generated confusion for new, it is my humble opinion |
I know this is an old PR, but the server-side rendering is broken because the saga functions don't return promises:
I think the solution is to separate the requests for the data needs from the saga, say a helper function, and use that in |
@aaronmcadam This error comes because saga doesn't return a promise. One way to handle this situation is to make |
Hi @somus, thanks for getting back to me! I ended up following the official |
Fixes #97