Fork me on GitHub
#re-frame
<
2018-01-15
>
caleb.macdonaldblack20:01:41

Any ideas why I might be getting this error when I am passing a key in?

caleb.macdonaldblack20:01:09

value is definitely not nil

phronmophobic20:01:39

are the values unique?

caleb.macdonaldblack21:01:01

["child" "parent" "sibling" "spouse"]

phronmophobic21:01:06

i’m not familiar with using metadata to add properties, but what’s the interaction when you provide properties via metadata and a map?

phronmophobic21:01:38

and if you’re using :li>a, are the properties applied to the li node or the a node or both?

caleb.macdonaldblack21:01:06

Hmm I’m not sure if it applies to both

caleb.macdonaldblack21:01:11

Using only one works though

caleb.macdonaldblack21:01:51

ahh must be applying to the a

caleb.macdonaldblack21:01:30

so using this :li>a it applies incorrectly the the link

sggdfgf21:01:10

(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?

sggdfgf21:01:22

this doeas not work either

sggdfgf21:01:27

(defn puppy [] (let [ok @(re-frame/subscribe [:text])] [:span ok]))

sggdfgf21:01:57

second renders once, but does not rerender on :text update

danielcompton21:01:07

@faxa second one looks fine

danielcompton21:01:14

but depends where you're calling it from

danielcompton21:01:28

The only way reagent knows to re-render is if a deref happens inside it's rendering cycle

danielcompton21:01:53

so if you subscribe and deref outside of reagent/render-component, then all it has is some plain data

sggdfgf22:01:48

thanks! @danielcompton is it possible as well to call a function in that call?

sggdfgf22:01:28

like: (defn puppy [] (let [ok @(re-frame/subscribe [:text])] (run) ;; <<-- this one? [:span ok]))

mikethompson23:01:43

@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.