-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
How to add non immutable store when combining reducers #69
Comments
I'm having this issue too, trying to use KELiON/redux-async-initial-state#15. Any suggestions @gajus ? |
We stopped using redux-immutable. Instead, if a library provide support for redux-immutable, we can still plug a redux-immutable reducer into the root, non immutable store. I will recommend to never use a root immutable store. This should be written in best practice. |
@kopax Thanks for your reply. Any idea how to do it? I tried but failed. |
I have not used Redux for a long time. Can you explain what is the reason you do not recommend having root store immutable? This suggestion makes sense if there is a requirement for interoperability with third party libraries. |
I know that the question is directed to @kopax, for me either way is fine, as long as I can mix immutable with regular objects. |
@rahamin1 you must use the @gajus ImmutableJS is a smaller community, it splitted the redux community which is bad and developer will have to support both (Like old times with IE). We developers want to keep things simple and this could have been solved long ago if the If you get my point, I advise that you remove it and you should see the redux-immutable community growing. |
I don't get your point. Are you suggesting not to use ImmutableJS at all? |
What I mean is If you do use I am suggesting to not suggest that to users. |
I understand what you are suggesting, I don't understand your arguments. I am not defending |
@gajus, the main concern is how to join the two community. I see it fairly simply. If you do have a root immutable store, then it will not happen. You should suggest users to use edit I missed the interesting part of your message, why aren't you using both redux and redux-immutable anymore? |
There is really no need for Redux. By now I have oversaw development of/ developed hundreds of React apps, and the benefits provided by Redux (to an avg. size application) are incredibly marginal compared to the boilerplate that is required to implement it. I use |
@kopax Would you mind sharing how managed to stop using redux-immutable? |
@gajus I'm currently looking to migrate from immutable to immer, and as a consequence I'll be migrating a store towards one that has some slices in ImmutableJS, and others in vanilla JS. The code base is huge and it would be impossible to do a 100% overhaul safely. Ideally, the combine-reducers function would be able to identify if the slice is immutable or JS and handle it accordingly.
I'm early in my investigation but, if the root store must be immutable then it introduces a few challenges:
I'll investigate the following comment and see what the process looks like to migrate from a pre-existing redux-immutable store to a partial immutable partial vanilla store.
|
Hi, thanks for redux-immutable.
I am trying to mix immutable reducer and classic reducer.
I have tried to tweak the
combineReducer.js
like this :And mix my reducer like this
But that doesn't work very well. Any Idea how I could achieve this ?
The text was updated successfully, but these errors were encountered: