salsita / redux-side-effects

Redux toolset for keeping all the side effects inside your reducers while maintaining their purity.
MIT License
180 stars 9 forks source link

Effects got promisified #10

Closed tomkis closed 8 years ago

tomkis commented 8 years ago

@calebmer This PR is rough example how promisified effects may help us with server-side render. Further description in https://github.com/salsita/redux-side-effects/pull/9

calebmer commented 8 years ago

I don't really like this approach, it breaks backwards compatibility and returns an unexpected object when coming from redux. I think the optimum solution would be to add a second dispatch-like function which returns the side effects.

And yeah, your right, non-promises will be automagically converted when using Promise.all 😊