This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-08-04
Channels
- # announcements (1)
- # babashka (29)
- # beginners (23)
- # clerk (3)
- # clojure (24)
- # clojure-europe (9)
- # clojure-gamedev (4)
- # clojure-norway (3)
- # clojurescript (11)
- # cursive (4)
- # datomic (10)
- # emacs (4)
- # hyperfiddle (22)
- # lsp (4)
- # missionary (10)
- # off-topic (95)
- # parinfer (11)
- # polylith (11)
- # reitit (16)
- # releases (1)
- # shadow-cljs (9)
Hi I want to (resolve (symbol "
in cljs.
Am I missing something? is there a way to make it work?
In CLJS, resolve
is a macro that accepts a quoted symbol. I.e. something like (resolve 'xxx)
or (resolve (quote xxx))
.
I'm trying to receive a string of a fully-qualified symbol and resolve it at runtime.
If I understand correctly the issue here is "at runtime".
I'm guessing the reason resolve
is a macro is to resolve the symbol at compile time...
Indeed. An alternative would be to have an explicit registry of all symbols that are intended to be resolvable.
Is there a guide on how to just embed CLJS in an existing web page? It seems in the getting started guide like I'm expected to generate the entire HTML in CLJS, which is massive overkill for what I'm looking for.
> I'm expected to generate the entire HTML in CLJS That's not the case at all. The way you use CLJS is exactly the same way you'd use e.g. TS or plain JS that requires some preprocessing. There's a build step, and then there's execution step. The latter can be done via embedding on a web page or via some other means. And the build step can also be omitted with e.g. https://github.com/babashka/scittle
a guide you may be interested in: https://code.thheller.com/blog/shadow-cljs/2023/07/13/the-lost-arts-of-cljs-frontend.html
@UFTRLDZEW thanks, this author gets it! 🙂 I'll give this one a close read