Skip to content

Instantly share code, notes, and snippets.

@splincode
Created May 8, 2019 07:59
Show Gist options
  • Save splincode/6b5548174d4cb82e5b31feb4d38c55e9 to your computer and use it in GitHub Desktop.
Save splincode/6b5548174d4cb82e5b31feb4d38c55e9 to your computer and use it in GitHub Desktop.
data = produce(INITIAL_DATA, draft => {
draft.items[NEW_ITEM_ID] = { id: NEW_ITEM_ID, name: 'ITEM-NEW', value: 0 }
draft.counter++
draft.keys.push(NEW_ITEM_ID)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment