Skip to content

Commit ac97e4e

Browse files
committed
fix linter warning
1 parent eb6d662 commit ac97e4e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/renderer/core.cljs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,17 @@
6969
██████╔╝░░░██║░░░╚██████╔╝██████╔╝██║╚█████╔╝
7070
╚═════╝░░░░╚═╝░░░░╚═════╝░╚═════╝░╚═╝░╚════╝░")
7171

72-
(defn mount-root! []
73-
(let [container (.getElementById js/document "app")
74-
root (ra.dom.client/create-root container)]
75-
(ra.dom.client/render root [error/boundary [app.v/root]])
72+
(def root-el (atom nil))
73+
74+
(defn ^:dev/after-load ^:export after-load []
75+
(rf/clear-subscription-cache!)
76+
(when @root-el
77+
(ra.dom.client/render @root-el [error/boundary [app.v/root]])))
7678

77-
(defn ^:dev/after-load after-load []
78-
(rf/clear-subscription-cache!)
79-
(ra.dom.client/render root [error/boundary [app.v/root]]))))
79+
(defn mount-root! []
80+
(let [container (.getElementById js/document "app")]
81+
(reset! root-el (ra.dom.client/create-root container))
82+
(ra.dom.client/render @root-el [error/boundary [app.v/root]])))
8083

8184
(defn bootstrap-cb!
8285
[]

0 commit comments

Comments
 (0)