clojurescript 2025-06-14

hi, quick question, new to clj, is it a must to learn clj before cljs? i am a full stack developer but i feel i can get quick feedback by tinkering with a reagent cljs project than getting into backend/api level code in clj

is replicant API for React? or does it have its own rendering engine?

It has its own.

1
đź’Ş 1

Not required, I was doing cljs exclusively for about 4 years before diving into clj/jvm stuff

Slightly off topic but if you're starting today I'd highly recommend starting with https://github.com/cjohansen/replicant instead of reagent, it's a much cleaner approach that I think will be easier to learn.

đź’Ż 3

And if you do, don't hesitate to pop in #replicant and ask any question you might have there.

(I also recommend starting with shadow-cljs, in case that's not what you're using already; also #shadow-cljs for help.)

nice, have to check it out then!

Just a quick question, I was seeing the ClojureScript quickstart; we have named our folder hello_world, and our file path is hello_world/core.cljs but the namespace used in program is hello-world.core ?! Why use - instead of of _

Just in case, there's also #beginners.

Even if - in paths works in CLJS (no clue), using _ still makes sense to keep it the same as in CLJ. And in CLJ you can't use - because namespaces translate into classes and you can't have dashes in class and package names.

It's an unfortunate historical quirk you'll have to learn to live with: your src directory should not contain anything with a -, and all of the _ will be mapped to - in Clojure(Script) (be they in dir names or file names).

Note that the quickstart, while worth going through, is a bit bare in terms of the tools it leaves you with by the end. I would consider following up with learning shadow-cljs at some point.

Okiee

It’s just a convention; likely won’t work otherwise (but I haven’t tried)

Traditionally, LISPs don’t use _ for symbols/names inside the program, defaulting to - instead; directories traditionally do use _

👍 1