Skip to content
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

understanding effective use of (use-cases for) redux-immutablejs #30

Open
Abhay-Joshi-Git opened this issue May 10, 2016 · 0 comments
Open

Comments

@Abhay-Joshi-Git
Copy link

My apologies for asking a silly question. I am new to redux world and started exploring use of immutable data structures recently.
I don't think I correctly understand the use-cases for which I should use this library and for which I should not. Perhaps, I really need to understand benefits we get by defining whole state as immutable structure over defining the individual parts as immutable but wrapper state as object.

e.g.  If I have redux state as follows :
 {
   todos , //array of todos 
   visibleFilter //boolean
 }

Now, I tried to defined todos as Immutable.List with single todo as a Immutable.Map. I kept visibleFilter as boolean only. I kept wrapper state object as a plain old object too. Is this case a good candidate where I should use redux-immutablejs ?

If the final/wrapper redux state itself is an array then I can surely see that using redux-immutablejs to make it immutable List would be a great idea as structural sharing would come into play.

I am sure I am missing something here. It would be great If anyone could please explain this.

@Abhay-Joshi-Git Abhay-Joshi-Git changed the title understanding use of (use-cases for) redux-immutablejs understanding effective use of (use-cases for) redux-immutablejs May 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant