Fork me on GitHub
#reagent
<
2020-10-06
>
souenzzo15:10:30

reagent will str my :key before pass it to react key?

p-himik15:10:42

Yes.

👍 3
souenzzo16:10:55

literally str or it will pr-str / .toString ?

lispers-anonymous16:10:06

If you use the react dev tools browser plugin I believe it will show you what the key is for a particular component.

p-himik16:10:04

Actually, my bad - it's React that does that:

if (hasValidKey(config)) {
      key = '' + config.key;
    }

p-himik16:10:30

All that Reagent does is:

(when-some [key (key-from-vec v)]
      (set! (.-key jsprops) key))

👍 3
souenzzo19:10:45

pass directly to react. awesome @U2FRKM4TW. thnks