Skip to content

Instantly share code, notes, and snippets.

@icsaba
Created May 19, 2022 06:22
Show Gist options
  • Save icsaba/fcd164a2824196413075bb98a2b910c4 to your computer and use it in GitHub Desktop.
Save icsaba/fcd164a2824196413075bb98a2b910c4 to your computer and use it in GitHub Desktop.
code snippet for my medium article
export const incrementBy = context.action(
(state, value) => ({someprop: state.someprop + value})
);
export const asyncAction = context.asyncAction(
async (_, value1, value2) => ({ value1, value2})
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment