Fix accessing js state in optimized build

This commit is contained in:
Juho Teperi 2019-08-14 10:53:05 +03:00
parent 555ae05947
commit 094a29b9df

View File

@ -1282,7 +1282,7 @@
;; "Expensive" calculation based on the props
#js {:v (string/join " " (repeat (inc (:value props)) "foo"))})
:render (fn [this]
(r/as-element [:p "Value " (.-v (.-state this))]))})
(r/as-element [:p "Value " (gobj/get (.-state this) "v")]))})
component (fn []
[pure-component {:value @prop}])]
(with-mounted-component [component]