This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-03
Channels
- # announcements (1)
- # babashka (31)
- # babashka-sci-dev (53)
- # beginners (34)
- # calva (54)
- # cider (15)
- # clj-kondo (9)
- # clojure (115)
- # clojure-dev (19)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (78)
- # clojurescript (10)
- # clr (9)
- # community-development (9)
- # core-async (24)
- # cursive (18)
- # datomic (59)
- # emacs (43)
- # figwheel-main (2)
- # fulcro (4)
- # graphql (4)
- # malli (7)
- # meander (12)
- # nbb (14)
- # off-topic (22)
- # polylith (9)
- # re-frame (5)
- # reitit (3)
- # releases (1)
- # shadow-cljs (36)
- # sql (1)
- # tools-build (23)
- # xtdb (13)
Stupid question but how can I generate a keyless object in JS? Since all the interops require key value pairs? F.e. (def obj #js {:foo 1})
but I just want a {1}
object?
There are no {1}
objects in JavaScript, since that doesn't make semantic sense. Are you looking for an array with the number 1 in it? #js [1]
? Or the number 1? 1
Ok googled around a bit and it seems that in ES6 {id} === {id: id}
hence my confusion. I only used javascript a long time ago and didn’t know this existed
What is the best way to share a spec across CLJS frontend and CLJ backend? I am currently keeping them as separate projects, but I'd like suggestions on how to structure them as well.
In a .cljc
file or files. Spec is available for both CLJ and CLJS, even the namespace is the same.
Do you keep both the frontend and backend in the same repository? Or do you manage the utility specs separately, and have them shared across
"shared across" would mean "in a third project, a library, referenced by the others through the usual orderly mechanism of referring to libraries". But you can certainly have cljs, clj, and cljc all in the same project. In that case, I like to keep them all together in 1 src tree because doing anything else is more difficult.
I definitely prefer storing everything in one project. Makes it so much easier to navigate.
You could consider #C013B7MQHJQ for supporting a monorepo too.