This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-15
Channels
- # adventofcode (6)
- # beginners (63)
- # boot (39)
- # cider (25)
- # clara (9)
- # cljs-dev (27)
- # clojure (100)
- # clojure-dev (39)
- # clojure-dusseldorf (7)
- # clojure-italy (32)
- # clojure-russia (23)
- # clojure-spec (28)
- # clojure-uk (51)
- # clojurescript (197)
- # core-async (44)
- # cursive (3)
- # datomic (14)
- # emacs (4)
- # fulcro (27)
- # graphql (23)
- # hoplon (4)
- # jobs (9)
- # juxt (1)
- # leiningen (3)
- # nyc (1)
- # off-topic (6)
- # om (7)
- # onyx (6)
- # parinfer (11)
- # re-frame (23)
- # reagent (15)
- # ring-swagger (1)
- # rum (15)
- # shadow-cljs (37)
- # sql (24)
- # uncomplicate (4)
- # unrepl (17)
Any ideas why I might be getting this error when I am passing a key in?
value is definitely not nil
are the values unique?
["child" "parent" "sibling" "spouse"]
That is my list
i’m not familiar with using metadata to add properties, but what’s the interaction when you provide properties via metadata and a map?
and if you’re using :li>a
, are the properties applied to the li
node or the a
node or both?
Hmm I’m not sure if it applies to both
Using only one works though
ahh must be applying to the a
so using this :li>a it applies incorrectly the the link
(defn run [] ;;Todo this subscription does not run I have no Idea ;;I expect it to run on every :text sub change (let [ok @(re-frame/subscribe [:text])] (clear) (reagent/render-component (my-eval) (.getElementById js/document "baby-dom-target")))) can not subscribe :thinking_face: 😳 😰 does it subsrcibe only from hiccup?
@faxa second one looks fine
but depends where you're calling it from
The only way reagent knows to re-render is if a deref happens inside it's rendering cycle
so if you subscribe and deref outside of reagent/render-component, then all it has is some plain data
thanks! @danielcompton is it possible as well to call a function in that call?
like: (defn puppy [] (let [ok @(re-frame/subscribe [:text])] (run) ;; <<-- this one? [:span ok]))
@faxa yes, it is possible to call run
. But it must be side effecting, right? In which case, it is pretty ugly and not idiomatic.