Fork me on GitHub
#rum
<
2016-09-12
>
nooga23:09:34

react complains about not having a key here

nooga23:09:10

I’m not sure how to fix this apart from having to move :li to my-list

nooga23:09:23

which is not ideal for me

nooga23:09:46

(the code isn’t about html lists at all but this illustrates the problem)

kenny23:09:08

@nooga See https://github.com/tonsky/rum#interop-with-react. I suggest using :key-fn:

(rum/defc my-component < { :key-fn (fn [x y z]
                                     (str x "-" y "-" z)) }
  [x y z]
  ...)

nooga23:09:36

I come from reagent so I was used to metadata approach

nooga23:09:21

it does the job

nooga23:09:14

I still have to discover this mixin magic in rum

nooga23:09:24

but it looks sane and powerful

kenny23:09:14

It is. Definitely worth a deep dive into the docs and code