This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-30
Channels
- # babashka (18)
- # beginners (90)
- # calva (33)
- # clara (6)
- # cljfx (11)
- # cljs-dev (22)
- # cljsrn (9)
- # clojure (71)
- # clojure-australia (2)
- # clojure-czech (15)
- # clojure-europe (27)
- # clojure-germany (9)
- # clojure-nl (4)
- # clojure-serbia (3)
- # clojure-uk (10)
- # clojurescript (17)
- # conjure (12)
- # data-oriented-programming (2)
- # deps-new (6)
- # fulcro (29)
- # graphql (10)
- # hugsql (6)
- # jobs (1)
- # lsp (59)
- # malli (8)
- # off-topic (76)
- # pathom (15)
- # polylith (130)
- # re-frame (9)
- # reagent (15)
- # releases (4)
- # rewrite-clj (6)
- # ring (6)
- # rum (9)
- # shadow-cljs (116)
- # specter (5)
- # testing (7)
- # tools-deps (24)
- # vim (6)
- # xtdb (17)
Hello. Why does case
behave this way?
(case :foo
:foo "foo") => "foo"
(let [foo :foo]
(case :foo
foo "foo")) => nil
I would expect both to yield "foo"
. What am I missing here?Thank you. So what is the idiomatic way to do a "case" like conditional when having the values as constants?
(let [foo :foo]
(condp = :foo
foo "foo"))
Provided that I understand your question correctly.Well, that's probably not exactly what you're after, but (condp = ...)
is pretty common.
https://clojuredocs.org/clojure.core/case "The test-constants are not evaluated."
hi I am planning to make a simple flat-file blog which are the options for server side cljs development
I would happily nominate Reitit + Ring-Jetty.
You may already know this, but âframeworksâ are not much of a thing in Clojure. At least when compared to what is available in JS land.
Hello There,
I am working with react-map-gl and trying to disable the + - for map zoom in and out but cannot get the button selected (let [zoom-in-button (first (-> js/document (.getElementsByClassName "mapboxgl-ctrl-zoom-in")))])
when shadow-cljs page load and this return HTMLCollection [] and I get this error Uncaught TypeError: Cannot read property âsetAttributeâ of null. I am not sure why I canât get the button selected.
Can I force the Clojurescript compiler to output Javascript that uses export
for each function that should be exported instead of module.export
?
You can do this using Shadow-CLJS, check out this thread: https://clojureverse.org/t/generating-es-modules-browser-deno/6116