Skip to content

Instantly share code, notes, and snippets.

@pablopaul
Created November 21, 2016 12:44
Show Gist options
  • Save pablopaul/afc3ecf795a63d6c66493e12c7e52571 to your computer and use it in GitHub Desktop.
Save pablopaul/afc3ecf795a63d6c66493e12c7e52571 to your computer and use it in GitHub Desktop.
Redux Store Subscriber Demo
// Logs 'x'
store.dispatch(insertCharacter('x'));
// Logs 'xy'
store.dispatch(insertCharacter('y'));
// `removeCharacter` is an action creator wrapping the `BACKSPACE` action
// Logs 'x'
store.dispatch(removeCharacter());
// Logs ''
store.dispatch(removeCharacter());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment