Fork me on GitHub
#reagent
<
2016-05-15
>
mccraigmccraig01:05:40

i often use the first approach @jfntn - what are your issues ?

jfntn01:05:15

hmm well the path “pointer” for the selected tab is outside of the tab itself so for components that deal with a single tab, they need the value in {…} plus the path itself this gets a bit tedious

lewix03:05:40

Does someone know why is the following working even though it shouldn't since set-timeout! is not a function

;;(def seconds-elapsed (r/atom 0))
;;(def set-timeout!
;;  (js/setInterval #(swap! seconds-elapsed inc) 1000))
;;
;;(defn
;;  ^{:component-did-mount set-timeout!};;work- (set-timeout!) also work 
;;  timer-component []
;;    [:div [:h2 "This is a timer"]
;;      "Seconds Elapsed: " @seconds-elapsed])
`

jfntn03:05:04

@lewix: not familiar with the setTimeout apis, but this looks like it’s working by side effects, don’t you get the same thing if you remove the :component-did-mount metadata?

lewix03:05:28

@jfntn @gadfly361 and I figure it out; It is working by side effects

odinodin07:05:12

I’ve just created a development tool for inspecting data in any Reagent app as a tree structure, I’d be happy to take feedback or pull requests: https://github.com/Odinodin/data-frisk-reagent

val_waeselynck09:05:44

@odinodin: Very cool! Would be nice to be able to view also a test representation that is suitable for copying