From a4da13d078f254621383f455e91c4ce9ff8c9c4e Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Fri, 30 Dec 2022 22:48:38 +0100 Subject: fix(frontend): Adhere to the new React mounting convention --- src/frontend/tau/core.cljs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/frontend/tau/core.cljs') 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 [] -- cgit v1.2.3