Fork me on GitHub
#reagent
<
2022-03-16
>
Drew Verlee20:03:29

given (->> [{:key "blah"} {:key "foo"}] (map some-cmpt)) i would to not get a warning about each child needing a unique key bc i tried to provide one. But i do. What i'm i missing?

p-himik20:03:25

That :key is just an argument, it's not a proper React key. It doesn't become a :key property on the real React component. Replace some-cmpt with (fn [{:keys [key] :as props}] ^{:key key} [some-cmpt args]) - should work.

👍 1
🎉 1
🍺 1
Drew Verlee20:03:10

yep, that makes sense.