Skip to content

Instantly share code, notes, and snippets.

@ravicious
Created April 3, 2015 10:09
Show Gist options
  • Select an option

  • Save ravicious/fb189aa45b7784624485 to your computer and use it in GitHub Desktop.

Select an option

Save ravicious/fb189aa45b7784624485 to your computer and use it in GitHub Desktop.
; 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