What should I be using for CSS-in-CLJS? (I'm using Reagent to build the DOM)
There are many options. Ones that I know of: - https://github.com/clj-commons/cljss - https://github.com/roosta/herb - https://github.com/khmelevskii/emotion-cljs - https://github.com/dvingo/cljs-emotion - https://github.com/noprompt/garden - https://github.com/Jarzka/stylefy - https://github.com/ghivert/modular-styles
One more https://github.com/thheller/shadow/wiki/shadow.markup
thanks 🙂
Which one to choose though? Any recommendations?
So I have a CLJ library that interns all public vars from another ns, that I need to be able to also use in CLJS. How can I make this happen? Considering that CLJS doesn't have intern
.
The code is basically:
(doseq [[sym var-ref] (ns-publics 'other.ns)]
(intern *ns* (with-meta sym (meta var-ref)) @var-ref))
(and I won't take "you can't do that" as an answer 😉)
You could try the following in a macro: reading in the source namespace as a string and parse that as clojure code and then find all def forms and emit them into the target namespace.
yikes
worth a shot I guess
@wombawomba Sounds like you are implementing something like https://github.com/clj-commons/potemkin#import-vars for cljs? I managed to do this for rewrite-clj v1, but decided to abandon the effort. https://github.com/clj-commons/rewrite-clj/blob/main/doc/design/01-merging-rewrite-clj-and-rewrite-cljs.adoc#potemkin-import-vars.
yeah pretty much
I'll take a look, thanks