immutablejs update use

Solutions on MaxInterview for immutablejs update use by the best coders in the world

showing results for - "immutablejs update use"
Jemma
16 Jul 2017
1 // Act on a single key/value in a Map​const avengersMap = Immutable.Map({  ironMan: 'Tony Stark',  captainAmerica: 'Steve Rogers',  blackWidow: 'Natasha Romanov'});​const updatedAvengers = avengersMap.update('ironMan', (ironManValue) => {  // ironManValue is a JavaScript type - no need for Immutable   // functions to modify it  return ironManValue + ' is ironMan';});​// Output:updatedAvengers Object {  "blackWidow": "Natasha Romanov",    "captainAmerica": "Steve Rogers",      "ironMan": "Tony Stark is ironMan",}
2
similar questions
queries leading to this page
immutablejs update use