it’s funny that if I haven’t written a question in a while, I feel a certain resistance . I admire those who can ask questions freely; I can fall into being a bit sheepish; it is out of a respect I hold for the Clojure community, and I just don’t want to waste anybody’s time . with this one, I suspect it’s something really simple
I’m creating a very simple web app with Helix . at this point it is simple enough that I can paste the code in its entirety: behold core.cljs
:
(ns app.core
(:require
[helix.core :refer [defnc $]]
[helix.dom :as d]
["react-dom/client" :refer [createRoot]]))
(defnc app []
(d/h1 "The Morning Red"))
(defonce root
(createRoot (.getElementById js/document "root")))
(defn mount-root []
(.render root ($ app)))
(defn start []
(mount-root))
I’m using shadow-cljs . when I go shadow-cljs watch app
, as one does, I get this:
[:app] Compiling ...
[:app] Build completed. (133 files, 132 compiled, 1 warnings, 7.87s)
------ WARNING #1 - :extending-base-js-type ------------------------------------
Resource: helix/core.cljs:12:3
--------------------------------------------------------------------------------
9 |
10 |
11 | (when (exists? js/Symbol)
12 | (extend-protocol IPrintWithWriter
---------^----------------------------------------------------------------------
Extending an existing JavaScript type - use a different symbol name instead of js/Symbol e.g symbol
--------------------------------------------------------------------------------
13 | js/Symbol
14 | (-pr-writer [sym writer _]
15 | (-write writer (str "\"" (.toString sym) "\"")))))
16 |
--------------------------------------------------------------------------------
now, it’s ‘just’ a warning . but I don’t like warnings . any advice? . perhaps the solution is to turn off the warning — so I’d appreciate to know how to do that
thanks for your time . you’re a wonderful bunch, and I’m proud to consider myself a Clojure programmer