This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-17
Channels
- # announcements (2)
- # asami (3)
- # babashka (30)
- # beginners (23)
- # calva (28)
- # cider (3)
- # clj-kondo (16)
- # clj-on-windows (7)
- # cljs-dev (7)
- # clojure (47)
- # clojure-austin (3)
- # clojure-europe (25)
- # clojure-gamedev (3)
- # clojure-greece (1)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (54)
- # community-development (24)
- # conjure (16)
- # duct (1)
- # emacs (8)
- # events (1)
- # figwheel-main (4)
- # fulcro (13)
- # gratitude (20)
- # helix (3)
- # honeysql (8)
- # hyperfiddle (12)
- # introduce-yourself (1)
- # jobs (6)
- # lambdaisland (1)
- # lsp (35)
- # malli (1)
- # meander (27)
- # minecraft (11)
- # off-topic (12)
- # pathom (1)
- # portal (11)
- # releases (1)
- # remote-jobs (1)
- # ring (11)
- # sci (1)
- # shadow-cljs (53)
- # specter (5)
- # xtdb (20)
I'm trying to port modulz design-system to cljs, and I'm using j/lit to brew js objects. I had an issue with a button that I suspect that has to do with order. Digging into I saw that the source object had all: 'unset'. I suspect that when I the object is tranformed into js the unpredictable order of clojure hash map is hitting me. So I ask: Does javascript respect the order of the keys in the Object ? It appears to do so. Object.keys shows the keys in the order of definition.
Key order in js is a bit complicated. https://stackoverflow.com/questions/5525795/does-javascript-guarantee-object-property-order
Now I'm using (jsvec-to-obj (j/lit ["all" "unset" ... and jsvec-to-obj instantiates a js object pairing the vec keys, I pay a hit at runtime, but the order is preserved and js can can apply its rules without being messed by the rules of the clojure map (j/lit {"all" "unset" ...