This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-18
Channels
- # announcements (2)
- # babashka (35)
- # beginners (59)
- # calva (17)
- # cider (3)
- # clerk (7)
- # clj-kondo (21)
- # cljfx (9)
- # cljs-dev (76)
- # clojure (98)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-europe (11)
- # clojure-gamedev (4)
- # clojurescript (14)
- # consulting (7)
- # cursive (6)
- # datascript (4)
- # datomic (12)
- # emacs (18)
- # events (2)
- # graalvm (9)
- # humbleui (3)
- # hyperfiddle (18)
- # jobs (4)
- # missionary (12)
- # nextjournal (2)
- # nrepl (7)
- # off-topic (31)
- # practicalli (2)
- # rdf (6)
- # releases (2)
- # scittle (10)
- # xtdb (9)
Curios can you do hot reloading for files other than css so say .md or .org I am loading them into a web page but this does not trigger a reload when editing is this possible ?
If using shadow-cljs yes https://clojureverse.org/t/using-none-code-resources-in-cljs-builds/3745
Thanks, intresting not quite what I am after as my resources are loaded via ajax so I was kind of looking to rerun the ajax calls when the .md files change locally
it's definitely possible, I guess it depends on the tool you're using, but also if you're running an SPA you might not need to reload the page just fetch more content? like it could happen in an outer layer/your app?
Just trying to get something to show up on the screen. Has anyone worked with CanvasJS before in clojurescript?
Errors
To get a field, you should use .-
instead of .
.
To use a React component in Reagent hiccup, you should precede it with :>
, as in [:> CanvasJSChart ...]
.
That fixed those errors, but I'm now getting this:
You should definitely spend some time learning how to debug such errors. Most of the time, it's very simple, and being able to fix them yourself is unequivocally better than asking online.
In this case, note that undefined
in the first error. You're trying to use something as a React (Reagent) component that's undefined.
Chances are, it's either CanvasJS
or CanvasJSChart
. Perhaps they should be accessed in some different way. Perhaps, CanvasJSReact
should be imported in a different way.
Also, js/console.log
is your best friend here. When you require some NPM package, you can log it and see whether the result does indeed look like something you'd expect and not, say, undefined
or {default: ...}
or {__esModule: ...}
or something else.
Import was incorrect, it worked after adding $default: ["@canvasjs/react-charts$default" :as CanvasJSReact]