Wednesday, February 6, 2019


Just note to future self:
Work buddy Noah used this immutable.js codepen to help me come up with "how can I modify values in particular Map which is the member of a Set":

const set = Immutable.Set([Immutable.Map({a:'1',b:'foo'}), Immutable.Map({a:'2',b:'bar'}), Immutable.Map({a:'3',b:'baz'})]);
const newSet = => 
    value.get('a') === '1' ? value.set('b', 'hello').set('c','woot') : value

No comments:

Post a Comment