aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2022-12-30 22:48:38 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2022-12-30 22:48:38 +0100
commita4da13d078f254621383f455e91c4ce9ff8c9c4e (patch)
tree6d1c9d7f2853db5c2363b1fb19dc29e41e45a328 /src
parent65941b3d420a0d919d3b0a6bf0f438fcc0e2f86a (diff)
fix(frontend): Adhere to the new React mounting convention
Diffstat (limited to 'src')
-rw-r--r--src/frontend/tau/core.cljs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/frontend/tau/core.cljs b/src/frontend/tau/core.cljs
index ab538f3..7665a20 100644
--- a/src/frontend/tau/core.cljs
+++ b/src/frontend/tau/core.cljs
@@ -1,19 +1,20 @@
(ns tau.core
(:require
- [reagent.dom :as rdom]
+ ["react-dom/client" :as rdom]
+ [reagent.core :as r]
[re-frame.core :as rf]
[tau.events :as events]
[tau.routes :as routes]
[tau.subs]
[tau.views :as views]))
+(defonce root (rdom/createRoot (.querySelector js/document "#app")))
+
(defn ^:dev/after-load mount-root
[]
(rf/clear-subscription-cache!)
(routes/start-routes!)
- (rdom/render
- [views/app]
- (.querySelector js/document "#app")))
+ (.render root (r/as-element [views/app])))
(defn ^:export init
[]