Created
November 7, 2016 21:37
-
-
Save tannerlinsley/2820a669af083e6d3ed010e9f81bdbf9 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 { Hook, Actions } from 'jumpsuit' | |
Hook((action, getState) => { | |
// Never letting the counter equal 10! | |
if (getState().counter.count === 10) { | |
Math.random() > 0.5 ? Actions.increment() : Actions.decrement() | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment