This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-04
Channels
- # aleph (8)
- # aws (14)
- # babashka (37)
- # beginners (30)
- # calva (5)
- # cider (4)
- # clj-kondo (21)
- # cljsrn (4)
- # clojure (234)
- # clojure-denmark (1)
- # clojure-europe (10)
- # clojure-france (10)
- # clojure-italy (4)
- # clojure-nl (17)
- # clojure-sanfrancisco (1)
- # clojure-spec (8)
- # clojure-uk (44)
- # clojurescript (20)
- # cursive (9)
- # datascript (2)
- # datomic (5)
- # emacs (9)
- # fulcro (50)
- # graalvm (32)
- # jackdaw (18)
- # leiningen (1)
- # malli (10)
- # meander (10)
- # nrepl (10)
- # off-topic (15)
- # pathom (20)
- # re-frame (14)
- # reagent (37)
- # reitit (7)
- # ring (1)
- # shadow-cljs (102)
- # test-check (6)
- # tree-sitter (15)
- # vim (4)
- # xtdb (2)
- # yada (1)
Hi, how do I deal with redefiniton of functions when using Form-2 reagent components? I don't want to loose the component state after changing the source code
form2 being this pattern
(defn counting-button [txt]
(let [state (reagent/atom 0)] ;; state is accessible in the render function
(fn [txt]
[:button.green
{:on-click #(swap! state inc)}
(str txt " " @state)])))
Hello! I have a error listener (set! (.-onerror js/window)(fn [message source lineno colno error]...
like this on browser and it works well, but stacktrace and other fields are in JS. I would like it to be translated to ClojureScript. I have source map in the project. I guess that would help.
I'm getting cljs.core/+, all arguments must be numbers, got [const number] instead
when trying to sum an int with a constant declared like this (def ^const x)
is there a way work around that and add and a constant with an int value?
(def ^:const x)
it should be a keyword instead of a symbol
+
working just fine with constants )
Thanks! I knew something was off 😄 I had one of these moments when you are so tired your brain is freezing
yes, but the closure-compiler will do that for you as well (if you actually never change it)
the "optimization" ^:const
does for clojure is much less relevant for CLJS (IMHO) since there is no var root stuff
How do I use Clojure libraries in a Clojurescript project? Is that a practical thing to do? I'm trying to use https://github.com/metabase/toucan in a Fulcro project. It gives me an error like this:
The required namespace "toucan.db" is not available, it was required by "sheluchin/client.cljs".
"toucan/db.clj" was found on the classpath. Should this be a .cljs file?
For the persistent: https://plasma-umass.org/doppio-demo/