Created
June 3, 2016 23:32
-
-
Save joaomilho/6dc439513dac0a6b38de4d5dccb429db 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
const load = equals('load') | |
const unload = complement(load) | |
const loading = set(lensProp('loading')) | |
const loadReducer = guard([ | |
[load, loading(true)], | |
[unload, loading(false)] // runs for all actions except `'load'` | |
]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment