From 633122e8ee102250a45082623c446bd4bad9e7cb Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Thu, 19 Apr 2018 19:37:32 +0300 Subject: [PATCH] Fix cljsRatom --- src/reagent/impl/component.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reagent/impl/component.cljs b/src/reagent/impl/component.cljs index 4e785f9..b4bcf18 100644 --- a/src/reagent/impl/component.cljs +++ b/src/reagent/impl/component.cljs @@ -137,9 +137,10 @@ (def static-fns {:render (fn render [] + ;; TODO: Use static property for cljsRatom (this-as c (if util/*non-reactive* (do-render c) - (let [rat (.-cljsRatom c)] + (let [rat (gobj/get c "cljsRatom")] (batch/mark-rendered c) (if (nil? rat) (ratom/run-in-reaction #(do-render c) c "cljsRatom" @@ -195,8 +196,7 @@ :componentWillUnmount (fn componentWillUnmount [] (this-as c - (some-> (.-cljsRatom c) - ratom/dispose!) + (some-> (gobj/get c "cljsRatom") ratom/dispose!) (batch/mark-rendered c) (when-not (nil? f) (.call f c c))))