Skip to content

Instantly share code, notes, and snippets.

@tannerlinsley
Last active November 7, 2016 21:34
Show Gist options
  • Save tannerlinsley/236910b4bb24fa7fe76973525b54b9cf to your computer and use it in GitHub Desktop.
Save tannerlinsley/236910b4bb24fa7fe76973525b54b9cf to your computer and use it in GitHub Desktop.
import { State } from 'jumpsuit'
const reducer = State({
// Initial State
initial: { count: 0 },
// Actions
increment (state, payload) {
return { count: state.count + 1 }
},
decrement (state, payload) {
return { count: state.count - 1 }
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment