Reputation: 13123
I have a immutable list object, within a Map
object, as follows:
let initialState = Immutable.fromJS({});
state = initialState;
state = state.set("myList", Immutable.List());
How do I append a value to "myList", thereby updating state
?
Upvotes: 13
Views: 20238
Reputation: 805
emails = List(new Array<string>());
defaultValues = ['[email protected]', '[email protected]'];
this.emails = this.emails.push(...this.defaultValues);
This is for typescript .
Upvotes: 4