Fork me on GitHub
#reagent
<
2016-11-21
>
michael.heuberger01:11:55

hello folks, does anyone know how to get the display name of any given component?

michael.heuberger01:11:01

or at least its function name?

danielcompton03:11:38

@michael.heuberger reagent.impl.component/comp-name

mikethompson05:11:17

@michael.heuberger the public API also includes reagent.core.component-path

colin.yates12:11:55

Hi all (cross post from the reagent group: https://groups.google.com/d/msg/reagent-project/iSxt-KVou98/x9yl4T1OBQAJ) In brief, my understanding is that I should never see the “SAME!” console.log in the following code in 0.6.0:

(def active-stage-headers (ratom/reaction .....)
 
(defonce old-stage-header-ids (atom [])) ;; - a "normal" atom, not a reagent.ratom/atom
(def active-stage-header-ids
  (ratom/reaction
   (let [result (mapv (comp :id :patient) @active-stage-headers)]
     (if (= @old-stage-header-ids result)
       (js/console.log "recalculating stage-header-ids SAME!")
       (js/console.log "recalculating stage-header-ids DIFFERENT!"))
     (reset! old-stage-header-ids result)
     result)))
But I am seeing the “SAME!” log message in an endless loop. Have I misunderstood?

colin.yates12:11:21

(trying in the #clojurescript channel as I can see tumbleweeds rolling by :-))