This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-06-27
Channels
- # babashka (39)
- # beginners (256)
- # calva (33)
- # cider (4)
- # clj-otel (8)
- # clojure (48)
- # clojure-denmark (3)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (45)
- # clojure-poland (1)
- # clojure-sweden (2)
- # clojure-uk (5)
- # clojuredesign-podcast (5)
- # clr (13)
- # core-async (9)
- # cursive (12)
- # data-science (2)
- # datahike (80)
- # datomic (5)
- # hyperfiddle (14)
- # introduce-yourself (4)
- # jobs (4)
- # lsp (7)
- # missionary (6)
- # polylith (25)
- # proletarian (5)
- # releases (1)
- # shadow-cljs (12)
- # squint (7)
- # xtdb (2)
With js-template is there a way to accomplish a fn call, eg equiv of <div class=${somefn()}></div>
what's js-template?
just template strings?
Yeah it’s for doing equiv of templateFn`<div class=${someFn()}></div>`; in js
Except from what I can tell you can only pass vars and not fn calls
i'm not sure you can create template literals in cljs...
shadow-cljs modern has a macro called js-template that allows for it I am just wondering if it allows for function calls or better (.-method this) style expressions
Hmm maybe this just works and I am overthinking it
otherwise its just like you'd do with str
, (js-template whatever/tag "<div class=" (some-fn) "></div>")
@U02FVPF04A1 https://clojureverse.org/t/modern-js-with-cljs-class-and-template-literals/7450
ah my mistake