Fork me on GitHub
#clojurescript
<
2022-08-03
>
john00:08:12

@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

👍 1
Jen13:08:31

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

Jen14:08:32

thanks, I'll look into it 🙂

Nathan14:08:43

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.

Jen14:08:05

some-> worked perfectly 😄

1