Fork me on GitHub
#re-frame
<
2019-11-22
>
metehan17:11:56

(for [c (take 20 (drop 0 @(rf/subscribe [:customers])))] [customer ^{:key (:_key (val c))} (val c)]) with this i got Every element in a seq should have a unique :key: ([:<> error then i removed ^{:key (:_key (val c))}part and put the key to customer element and still same error (defn customer [client] [:tr.cell {:key (:_key client)}

enforser17:11:36

FYI, you throw three `s on a line above your code and below to make a code block that is more readable For example:

this is
my 
code
block

metehan17:11:25

new version of slack had this button but i was keeping it very narrow i just saw "code block " button 🙂

metehan17:11:13

more readable version :)

metehan17:11:40

this solved the problem

(for
     [c (take 20 (drop 0 @(rf/subscribe [:customers])))]
      [:<> {:key (key c)} [customer (val c)]])

lilactown17:11:52

the metadata should go on the vector

lilactown17:11:08

^{:key ...} [customer (val c)]