Closed scherler closed 8 years ago
Thanks for the PR @scherler. It would be nice to be able to have Redux out of the box, I really like Redux as well, but not everyone is using Redux. Since this is a boilerplate I'd like to avoid adding any frameworks to it other than React itself.
But it would be great to be able to add redux very easily. Maybe a separate branch? Maybe a yeoman generator?
I'm definitely open to suggestions but I'd like to avoid adding Redux as a hard dependency to master
.
Yeah, I understand what you mean, maybe in the spirit of https://github.com/iansinnott/react-static-boilerplate/issues/5 but I must admit I am not sure how to do that ATM. The main problem is that you have to wrap the App component with the redux store to inject it in the App as global meaning one would need to do the "wiring" outside of the app in the dependency but still it would need to be sufficient extensible for the user to add their logic. as said I have to think about it.
You can merge the PR into a branch if you want, I am not sure how I can open a PR against a new branch of your rep.
OK, I'll close this PR for now but it can server as a reference to anyone else who wants to integrate with Redux. I'll add a note to the readme. Thanks @scherler
+1 For not merging this, but referencing to it instead.
The PR contains a complete working version with a redux store and static html export. The last was a bit tricky but in the end I found a way to workaround the invocation of the store/provider.
redux state is created using Immutable and further hooked up https://github.com/zalmoxisus/redux-devtools-extension for dev experience.