mirror of
https://github.com/status-im/reagent.git
synced 2025-01-26 03:39:21 +00:00
Fix accessing js state in optimized build
This commit is contained in:
parent
555ae05947
commit
094a29b9df
@ -1282,7 +1282,7 @@
|
|||||||
;; "Expensive" calculation based on the props
|
;; "Expensive" calculation based on the props
|
||||||
#js {:v (string/join " " (repeat (inc (:value props)) "foo"))})
|
#js {:v (string/join " " (repeat (inc (:value props)) "foo"))})
|
||||||
:render (fn [this]
|
:render (fn [this]
|
||||||
(r/as-element [:p "Value " (.-v (.-state this))]))})
|
(r/as-element [:p "Value " (gobj/get (.-state this) "v")]))})
|
||||||
component (fn []
|
component (fn []
|
||||||
[pure-component {:value @prop}])]
|
[pure-component {:value @prop}])]
|
||||||
(with-mounted-component [component]
|
(with-mounted-component [component]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user