Last active
November 7, 2016 21:34
-
-
Save tannerlinsley/236910b4bb24fa7fe76973525b54b9cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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