My card doesn't re-render when state changes. Any idea why? (I can see state changes in inspector)
(defcard-rg counter
(fn [data _]
[:div
[:h2 "Counter Example"]
[:div (:counter @data)]
[:button {:on-click (fn [e] (swap! data update :counter inc))} "+"]])
(reagent/atom {:counter 0})
{:inspect-data true})
hmm this works
(defn xxx [data]
[:div (@data :counter)])
(defcard-rg counter
(fn [data _]
[:div
[:h2 "Counter Example"]
[xxx data]
[:button {:on-click (fn [e] (swap! data update :counter inc))} "+"]])
(reagent/atom {:counter 0})
{:inspect-data true
:history true})