I'm learning to use ImmutableJS but I'm a little confused. I looked at the documentation and I see there are Maps for objects and Lists for arrays.
So I build an object like:
sampleTodo = Immutable.Map({text: 'Testing 1 2 3', status: 'Open'})
And then do: list = Immutable.List().push(sampleTodo)
Not sure if this is right. If it is, I get stuck when I have an index and have to return a modified List
.
For example, if index is 0, I do:
list.get(index)
and get
Object {size: 1, _root: ArrayMapNode, __ownerID: undefined, __hash: undefined, __altered: false}
So, I don't see how I can set the status of the Map
object to status: "Complete"
by going through the List
.