Skip to content

Instantly share code, notes, and snippets.

@mweststrate
Created January 9, 2018 10:57
Show Gist options
  • Save mweststrate/17c453c9f5cc3dbee7d8e50fdf0c5c0a to your computer and use it in GitHub Desktop.
Save mweststrate/17c453c9f5cc3dbee7d8e50fdf0c5c0a to your computer and use it in GitHub Desktop.
update-in
// ImmutableJS
const newMap = map.updateIn(['inMap', 'inList'], list => list.push(4))
// Immer
draft.inMap.inList.push(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment