Map.merge
Sometimes we want to update multiple properties. We can do this using the merge
method.
let baseButton = Immutable.Map<string, any>({
text: 'Click me!',
state: 'inactive',
width: 200,
height: 30
});
let submitButton = baseButton.merge({
text: 'Submit',
state: 'active'
});
console.log(submitButton);
// writes { text: 'Submit', state: 'active', width: 200, height: 30 }
原文: https://angular-2-training-book.rangle.io/handout/immutable/immutable-js/maps/map_merge.html