This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-10
Channels
- # aatree (4)
- # admin-announcements (1)
- # beginners (62)
- # boot (279)
- # business (14)
- # cider (1)
- # cljsrn (3)
- # clojure (88)
- # clojure-czech (3)
- # clojure-madison (2)
- # clojure-poland (117)
- # clojure-russia (74)
- # clojurescript (168)
- # core-async (8)
- # css (6)
- # datavis (39)
- # datomic (67)
- # devcards (2)
- # dirac (1)
- # editors (9)
- # emacs (13)
- # events (2)
- # hoplon (2)
- # jobs (9)
- # ldnclj (38)
- # lein-figwheel (9)
- # leiningen (7)
- # luminus (4)
- # off-topic (77)
- # om (114)
- # omnext (1)
- # onyx (221)
- # parinfer (10)
- # portland-or (5)
- # proton (3)
- # re-frame (24)
- # reagent (14)
- # ring-swagger (13)
how do I add arbitrary attributes to a tag? for example [:table {:foo "bar"}] does not seem to translate to <table foo="bar">
"If you pass properties to native HTML elements that do not exist in the HTML specification, React will not render them. If you want to use a custom attribute, you should prefix it with data-."
@grav: if you derive in components they're recomputed each render I believe
@martinklepsch: Ok, so it’s an optimization. I wonder if it’s worth the complexity
It is an optimization but I thought it also was a way of explicitly defining a signal graph. It seems to me to be a decomplecting thing, not a complecting thing. I don’t use the database and reactions for static data, but I absolutely use it if I’m changing my render for any reason, the parts that can mutate go in the database, and I use reactions to describe signals that resolve to values and drive the react render.
@sonnyto if you have to have an unsupported attribute, you can [span {:dangerouslySetInnerHTML {:__html "<scary foo=1></scary>"}}]
, but best to avoid them if possible
@timothypratley: lol data-* attribute is supported so I used that
ooOOOOooo nice!!!