setusoft / silhouette-play-react-seed

A Silhouette Seed template which shows how Silhouette can be used to create a SPA with React/Redux and Play
MIT License
68 stars 21 forks source link

Make sagas injectible #3

Closed akkie closed 7 years ago

akkie commented 7 years ago

Webpack allows to split code into multiple modules which can be loaded lazy at runtime. For this it must be possible to inject code at runtime into the store. With reducers this is already possible but not with sagas.

Hot module reloading is also affected from this functionality.

https://github.com/redux-saga/redux-saga/issues/76 https://github.com/GuillaumeCisco/redux-sagas-injector

akkie commented 7 years ago

With v0.7.0 of redux-saga, it's possible to dynamically running Sagas after the applyMiddleware phase.

https://github.com/redux-saga/redux-saga/releases/tag/v0.7.0

Maybe we can unify the reducer injection and the saga injection, as described in the following examples: https://github.com/redux-saga/redux-saga/issues/76#issuecomment-181541404 http://stackoverflow.com/questions/32968016/how-to-dynamically-load-reducers-for-code-splitting-in-a-redux-application https://gist.github.com/gaearon/0a2213881b5d53973514