Created
April 3, 2015 10:09
-
-
Save ravicious/fb189aa45b7784624485 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
| ; different approaches to constructing handlers in re-frame | |
| ; which one's better? | |
| (register-handler | |
| :cell-clicked | |
| (fn [db _] | |
| (dispatch [:change-cell-owner]) | |
| (dispatch [:change-current-player]))) | |
| (register-handler | |
| :cell-clicked | |
| (fn [db _] | |
| (-> | |
| db | |
| (change-cell-owner) | |
| (change-current-player)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment