This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-03
Channels
- # announcements (5)
- # babashka (7)
- # beginners (119)
- # biff (4)
- # cider (7)
- # clj-kondo (26)
- # cljfx (3)
- # cljs-dev (2)
- # clojure (28)
- # clojure-austin (18)
- # clojure-europe (9)
- # clojure-france (6)
- # clojure-norway (4)
- # clojure-uk (3)
- # clojurescript (6)
- # community-development (1)
- # core-async (4)
- # cursive (9)
- # data-science (12)
- # datomic (13)
- # duct (18)
- # emacs (15)
- # etaoin (5)
- # events (13)
- # honeysql (46)
- # hyperfiddle (9)
- # jackdaw (5)
- # jobs (13)
- # keechma (4)
- # lsp (37)
- # malli (32)
- # nbb (14)
- # off-topic (10)
- # other-languages (2)
- # polylith (4)
- # programming-beginners (3)
- # reagent (27)
- # reitit (1)
- # shadow-cljs (32)
- # sql (11)
- # tools-build (5)
- # tools-deps (3)
- # vim (14)
- # xtdb (11)
@sameertj you may need to set something like :language-out to something like :es-next https://clojurescript.org/reference/compiler-options#language-in-and-language-out
Hi how can I do optional chaining in clojurescript? I'm trying to access nested elements on an object that might not exist. (.. object -elem -maybeelem)
is what I tried, but I'm looking for an equivalent to js's object.elem?.maybeelem
Maybe the thread macro some->
can be helpful https://clojure.org/guides/threading_macros#_some_some_and_cond
If it's an option for you, I'd also recommend this package https://github.com/applied-science/js-interop I use it a lot and for the use case you're describing I'd use get-in
as I'd use with CLJS data structures.