This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-06
Channels
- # admin-announcements (2)
- # aws (3)
- # beginners (25)
- # boot (7)
- # cider (27)
- # cljs-dev (30)
- # clojure (106)
- # clojure-boston (1)
- # clojure-czech (3)
- # clojure-dev (3)
- # clojure-estonia (1)
- # clojure-italy (1)
- # clojure-russia (11)
- # clojure-uk (3)
- # clojurescript (83)
- # clojurex (1)
- # datascript (1)
- # datomic (21)
- # docs (7)
- # funcool (1)
- # hoplon (8)
- # jobs (2)
- # ldnclj (9)
- # leiningen (6)
- # om (6)
- # onyx (29)
- # re-frame (41)
- # reagent (64)
- # spacemacs (2)
- # test200 (1)
@levitanong: the version passing a string always append. You can do :class (cell= {:some-constant-class-name true :work work? :play ?play})
In this case if ?work
is thruty the element will have the class work, and if it's false it won't. This will work. Or better yet: :class (cell= {:some-constant-class-name true :work work? :play (not ?work)})
Hmm. That doesn’t seem to scale to, say, 100 possible states. Then again, at that point, one could use (merge)
@levitanong: 100 possible states are too many states 😉 You can also create a do!
method that deals with class in any way you want.
@mynomoto: Well, that’s a good point. 😛
https://www.youtube.com/watch?v=i3Xack9ufYk possibly of interest @alandipert @micha et al