Skip to content

Instantly share code, notes, and snippets.

@timdeschryver
Created June 6, 2018 18:28
Show Gist options
  • Select an option

  • Save timdeschryver/deb261a716723f06bb5bff099c265b42 to your computer and use it in GitHub Desktop.

Select an option

Save timdeschryver/deb261a716723f06bb5bff099c265b42 to your computer and use it in GitHub Desktop.
ctx.setState(
produce((draft) => {
draft.cartItems[action.payload.sku] = (draft.cartItems[action.payload.sku] || 0) + 1;
})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment