Skip to content

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

Description

@Abhay-Joshi-Git

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions