update more powerful when your new value is the result of converting the current value:
const inc = (x) => (x + 1) const m = Immutable.Map({a: 1, b: 2, c: 3}) m.update('b', inc)
vs. with set :
m.set('b', inc(m.get('b'))
This example is pretty trivial, but the pattern of applying transformations to your data this way becomes more common when you start building your algorithms around your data (like in FP ), and not vice versa. Ive done things before in a game like game.update('player', moveLeft) .
If you know what the new value is, then just use set , since update(key, x => val) pretty stupid.
source share