Skip to content

Instantly share code, notes, and snippets.

@splincode
Last active May 25, 2019 15:53
Show Gist options
  • Save splincode/543eb4e77d4b94456360ebf9f67f48bd to your computer and use it in GitHub Desktop.
Save splincode/543eb4e77d4b94456360ebf9f67f48bd to your computer and use it in GitHub Desktop.
data = data.mergeDeep({
items: {
[NEW_ITEM_ID]: { id: NEW_ITEM_ID, name: 'ITEM-NEW', value: 0 }
},
keys: [ ...INITIAL_DATA.keys, NEW_ITEM_ID],
count: (data.get('count') as number) + 1
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment