goldhand / cookiecutter-webpack

Boilerplate for webpack 2, babel, react + redux + hmr, and karma. Can be inserted into existing django projects.
92 stars 16 forks source link

Sagas? #17

Open awhillas opened 7 years ago

awhillas commented 7 years ago

Hey, I just went though the whole saga of the sagas setup. Perhaps you might want to make sagas or thunk optional extras?

Also, most people are going to need "babel-polyfill" in which case i went the babel-runtime route as it seemed the lest invasive in future development efforts.

Also, hit a weird bug with the dev tools that you seemed to have solved, which i was surprised to not see here?

goldhand commented 7 years ago

Thanks for these suggestions @awhillas Hopefully adding sagas wasn't too difficult (did you add them here?) I haven't used them before (I've been using thunk) but they look great, I love async/await! If you have your saga setup in the configureStore.js file it shouldn't be too hard to make it a cookiecutter option, I would accept a pull request for that.

Will create a separate issue for babel-polyfill. Currently Promise and fetch have polyfills for them but they are not the babel-polyfill. Would be a lot better to just have babel-polyfill rather than the promise and fetch ProvidePlugin configuration

Regarding the devtools setup, I'll push that fix asap haha...

awhillas commented 7 years ago

Oh,

A use case for the sagas would be to do a Django login/logout button in the demo app. Its a pain in the butt to do from scratch and would really attract some interest, as well as be a good use case example for React+Django+Sagas(+saga testing), but then might need something like a dependancy on Django REST framework.

Maybe that should be a fork off this project?