This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-19
Channels
- # aws (4)
- # aws-lambda (2)
- # beginners (67)
- # boot (38)
- # cider (32)
- # cljs-dev (12)
- # cljsrn (2)
- # clojars (2)
- # clojure (190)
- # clojure-chicago (1)
- # clojure-dusseldorf (2)
- # clojure-germany (1)
- # clojure-greece (3)
- # clojure-italy (5)
- # clojure-russia (6)
- # clojure-spec (47)
- # clojure-uk (10)
- # clojurescript (59)
- # cursive (9)
- # data-science (14)
- # datomic (24)
- # devops (16)
- # emacs (8)
- # fulcro (25)
- # graphql (30)
- # hoplon (123)
- # juxt (15)
- # lambdaisland (2)
- # leiningen (4)
- # luminus (6)
- # lumo (9)
- # off-topic (11)
- # om (7)
- # onyx (8)
- # re-frame (14)
- # reagent (5)
- # ring-swagger (5)
- # shadow-cljs (46)
- # spacemacs (41)
- # specter (8)
- # testing (8)
- # unrepl (31)
- # yada (18)
I’m using re-com and generating input boxes using a map over a collection of labels. But I get a react warning saying Every element in a seq should have a unique :key
- I understand why the key is expected. I just don’t know how do I add it using re-com, hiccup etc. Anyone know?
normally the easiest is to add a prop like {:key some-unique-key}
this could help: https://presumably.de/reagent-mysteries-part-1-vectors-and-sequences.html
@aymat316 Here is an example of how we do it in re-com. It uses a for
, but same thing should apply with map
: https://github.com/Day8/re-com/blob/master/src/re_com/alert.cljs#L109-L120