This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-30
Channels
- # announcements (8)
- # babashka (73)
- # beginners (126)
- # calva (8)
- # cider (5)
- # circleci (2)
- # clara (9)
- # clj-kondo (4)
- # cljdoc (18)
- # cljfx (49)
- # clojure (51)
- # clojure-australia (3)
- # clojure-europe (41)
- # clojure-france (1)
- # clojure-nl (5)
- # clojure-norway (1)
- # clojure-russia (1)
- # clojure-uk (16)
- # clojurescript (14)
- # conjure (4)
- # cursive (5)
- # data-science (7)
- # datascript (1)
- # datavis (1)
- # datomic (13)
- # defnpodcast (2)
- # emacs (4)
- # events (2)
- # figwheel-main (7)
- # graalvm (23)
- # hoplon (2)
- # jobs (1)
- # meander (15)
- # numerical-computing (1)
- # off-topic (35)
- # pedestal (5)
- # portkey (5)
- # re-frame (19)
- # reagent (9)
- # reitit (14)
- # releases (1)
- # shadow-cljs (28)
- # sql (4)
- # tools-deps (5)
- # xtdb (7)
I'm going through the reagent tutorial
https://github.com/reagent-project/reagent/tree/master/examples/simple if I invoke leinfighwheel that works but the command for the production build does not work, can someone please help me with this?
Hello, I'm using react-data-grid to show some data. But since version 7.0.0.canary.17 this lib uses some ES2020 feature, as it says: react-data-grid is published as ES2020 modules, you'll probably want to transpile those down to scripts for the browsers you target using https://babeljs.io/ and https://github.com/browserslist/browserslist. How can I enable this for cljs? Thanks.
I need to call googles gtag like here https://developers.google.com/gtagjs/reference/api#event What's a proper, neat or idiomatic or accepted way to do this such that if gtag is not there, it won't fail?
I'm a bit puzzled by something and could use some help.
I have a function with-key-meta
that decorates children with metadata, specifically {:key ...}
This function looks like this:
(defn with-key-meta [coll]
(doall (for [[id child] coll]
(with-meta child {:key id}))))
When called like this, it works:
[:div.foo (with-key-meta (map-indexed vector children))]
Why doesn't this work the same way?
[:div.foo (mapv (fn [[id child]]
(with-meta child {:key id}))
(map-indexed vector children))]
I can do (into [:div.foo] ...)
and make it work, but both of these things are persistent vectors. Why is the fn call treated differently than the inline expression?
To avoid having to use into
with outer components, you can create a fragment by putting everything into [:<>]
:
(into [:<>] (map-indexed ...) children)
If you don't really care about the :key
yourself and just want to fix that warning, then just don't use seqs and use vectors and fragments instead without any metadata.
It's all in the documentation: https://reactjs.org/docs/lists-and-keys.html#keys