This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-12
Channels
- # announcements (1)
- # architecture (112)
- # asami (22)
- # babashka (74)
- # beginners (189)
- # chlorine-clover (4)
- # cider (105)
- # clj-kondo (21)
- # clojure (45)
- # clojure-australia (1)
- # clojure-europe (26)
- # clojure-losangeles (4)
- # clojure-nl (3)
- # clojure-spec (5)
- # clojure-uk (8)
- # clojurescript (16)
- # conjure (1)
- # cursive (29)
- # datascript (21)
- # datomic (35)
- # events (1)
- # fulcro (12)
- # graalvm (3)
- # graphql (31)
- # kaocha (13)
- # malli (14)
- # meander (3)
- # mount (3)
- # off-topic (73)
- # pathom (9)
- # pedestal (5)
- # portal (2)
- # re-frame (4)
- # reagent (8)
- # reitit (3)
- # rum (1)
- # shadow-cljs (26)
- # spacemacs (3)
- # sql (6)
I'm going to cross-post this to #clojurescript, as I think it's an issue with the CLJS compiler, but I don't really know that for certain.
Does anyone want to work through https://www.youtube.com/playlist?list=PLdSfLyn35ej-n-SnvLkoTwdxhJWnfQ1QN Via a video meeting? Will just follow along and talk about choices, changes, etc...
I am trying to write a reader macro that will e.g. turn clojure.core/+ into clojure.core/- that works in for cljs. I was returning the clojure.core.Var for - which I now know will not work. What is the right way to do this? I had a solution working with calling eval in the macro but cljs doesn't have eval, right or am I off base there?
Hello all. Given that
(into [] #{2 3 4}) => [4 3 2]
and
(apply (partial disj #{1 2 3 4}) [2 3 4]) => #{1}
shouldn't
(apply (partial disj #{1 2 3 4}) (into [] #(2 3 4)))
also eval to #{1}
? I get an error, namely
#object[Error Error: function (){
return (2).call(null,(3),(4));
} is not ISeqable]
This seems to violate the transitive law of things evaling to things. Can anyone suggest a workaround?it's trying to call 2 on the args 3 and 4. and you're trying to get a seq of that which doesn't work for obvious reasons
Is it possible to write a component in reagent that takes multiple children but doesn’t require a key on each child to render it?
Dynamic children or static children? I’d argue that dynamic children should always have a key, otherwise you might be looking for something like this:
[:<>
[:span "a"]
[:span "b"]
[:span "c"]]
If you want
<span>a</span>
<span>b</span>
<span>c</span>
Aye it’s static children. Thanks!
;; static placement doesn't require keys
(defn my-component
[child1 child2]
[:div child1 child2])
;; dynamic number requires using `into`
(defn my-component
[& children]
(into [:div] children))
Thanks!