This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-16
Channels
- # aleph (2)
- # beginners (68)
- # boot (25)
- # bristol-clojurians (5)
- # cider (10)
- # cljs-dev (60)
- # cljsrn (1)
- # clojure (138)
- # clojure-austin (1)
- # clojure-france (2)
- # clojure-greece (11)
- # clojure-italy (4)
- # clojure-russia (16)
- # clojure-spec (4)
- # clojure-uk (75)
- # clojurescript (26)
- # core-async (28)
- # cursive (25)
- # data-science (4)
- # datomic (16)
- # defnpodcast (2)
- # devops (2)
- # docs (10)
- # duct (11)
- # emacs (1)
- # events (1)
- # figwheel (8)
- # fulcro (61)
- # garden (2)
- # hoplon (6)
- # java (6)
- # jobs-discuss (1)
- # lein-figwheel (14)
- # leiningen (86)
- # luminus (11)
- # off-topic (8)
- # parinfer (9)
- # pedestal (2)
- # re-frame (19)
- # reagent (1)
- # ring (3)
- # ring-swagger (8)
- # shadow-cljs (278)
- # spacemacs (13)
- # sql (5)
- # testing (7)
- # unrepl (8)
- # yada (25)
@thedavidmeister Thanks. I just discovered :css/*
. Still need to upgrade past 7.0.3.
I dont understand the semantics of :class/myelem
. What does the symbol after :class/
mean semantically? Why would you reference myelem
in it's own definition?
Is there a standard way to manipulate the attrs
map from a component declaration. Something like
(myelem (assoc attrs :css #(merge new-css %)))
Or is this more complicated due to Hoplons machinery to maintain dynamic attrs..?uh, it doesn't mean anything :class/foo
is fine
it's just a way to avoid collisions so you don't override like you were saying
@chromalchemy the issue comes in when you are looking to create dynamic attributes, you would need to wrap each component layer in a formula cell to maintain “reactivity” for the attribute. With the :class/*
method each layer can implement it’s own attributes without colliding with existing ones, since an element’s attributes are just a map (what david said), when you are making libraries of components this greatly simplifies the code needed.