Skip to content

Instantly share code, notes, and snippets.

@narennaik
Last active August 1, 2021 08:50
Show Gist options
  • Save narennaik/acdb585d492f65280105b345a6b21666 to your computer and use it in GitHub Desktop.
Save narennaik/acdb585d492f65280105b345a6b21666 to your computer and use it in GitHub Desktop.
What if we want to update/change the state? We would dispatch a change/action
const action = { type: 'ADD_TODO', payload: 'Have a snack' };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment