Fork me on GitHub
#re-frame
<
2021-08-31
>
lsenjov02:08:55

Tells reagent (and react) to add (:id todo) as the key of the todo-item

escherize02:08:59

It’s merging {:key (:id todo)} into the metadata on the todo-item component

escherize02:08:30

which reagent uses to fill in the key property

escherize02:08:08

you can also do it inside the todo-item component, by putting {:key (:id todo)} in the top level attributes

lilactown02:08:30

this is a good explanation of what a key is used for: https://reactjs.org/docs/lists-and-keys.html

👍 2