Created
January 20, 2014 16:42
-
-
Save cgrand/8523669 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
;; without the automatic application/component state split idea prompted by David | |
(let [t (template | |
:li (dup :items | |
:label (content :desc) | |
checkbox (mash | |
(attr :checked :done) | |
(on-click [e item] | |
(update-in item [:done] not)) | |
; or | |
#_(scope :done | |
(on-click [e done] | |
(not done))))))] | |
(t {:items [{:desc "Todo #1" | |
:done false} | |
{:desc "Todo #2" | |
:done true}]})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment