-
Notifications
You must be signed in to change notification settings - Fork 84
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
Changing combineReducers breaks reducer generator #32
Comments
Same Problem seems to be for actions aswell. It starts to link files, but then fails somewhere and leaving behind files that are linked but do not exist and so on :( |
Give me a couple of days to look into this, might have to do with ast parsing. |
Any update on this issue? I'm adding the routerReducer as the first obj pair in
|
Alright, this seems to be multiple issues at once. The spread operator ... seems to be a problem when parsing the abstract syntax tree. So @Primajin instead of
simply add the router reducer to the reducers like @juegas does. After adding the router reducer like so, I have absolutely no problems adding reducers / actions. @juegas which yo command fails on your side exactly? Could any of you share their project, so I can take a look? I tried re creating the issue from a fresh setup from the master branch and everything is working as it should. So I can not reproduce the issue on my side:
|
Allright, I have this on my machine at work and will give you all the infos as soon as I'm back in the office tomorrow morning (CEST) |
yo:Action is adjusting yo:Reducer is failing silently. It is successfully adding |
@stylesuxx OK after adding the router reducer like you guys suggested it works as expected. It does not fail for me anymore, but if it does, it does it silently and leaves back half way created files which is not so cool. So at least that would be great to get rid of. I'm on a MBP with latest OSX. |
I'm also on an MBP with the latest OSX |
OK, so both on you are on mac. Interesting. I am on Linux and get an error -_- will be awesome to debug :-D I guess I should be able to get rid of it when I change AST parsing to acorn, but right now I have not enough time to dive into that. So @Primajin is good now as I understand. @juegas you are still experiencing problems? |
@stylesuxx well yea the issue remains but it doesn't block me from my experimentations with react-rout + redux-router. gl looking into it and thanks |
So I was using the
yo react-webpack-redux:reducer myReducer
command with no problems.Since you suggested using react-router-redux, I implemented it into my
reducer/index.js
with a simple import ofimport { routerReducer } from 'react-router-redux';
and changed the last line frommodule.exports = combineReducers(reducers);
to
module.exports = combineReducers({...reducers, routing: routerReducer});
When I now try to run the yo command it fails silently. Changing the last line back to what it was before while leaving the (now unused) import inside the file - and the command works again.
Now what I find very curious about is, that this line does not change when adding new reducers, and thus should not cause the generator to fail nor should it fail silently like this.
Let me know if you need any more information.
Cheers
The text was updated successfully, but these errors were encountered: