active-group / reacl

ClojureScript library for interfacing with React framework
78 stars 1 forks source link

`dom/keyed` does not return a React element #10

Closed dfrese closed 5 years ago

dfrese commented 5 years ago

Surprisingly dom/keyed does not return a valid React element, so the return value cannot be used as a child for React components. If that cannot be changed, then it should be clearer in the docs. A convenience function (with the argument order flipped) would then be nice, like in

(-> (dom/...)
      (dom/set-key! "abc")) 
mikesperber commented 5 years ago

I don't see it is this way. It may have to do with the fact that the React key mechanism has changed over time.

There is the issue of what to do with an argument element that already has a key.