Fork me on GitHub

Ok, so I have a component similar to:

(defn greeting [& contents] [:h1 contents])
But when I pass in complex contents like I could to h1 (e.g.
[:h1 "World " [:strong "Wide Web"]] 
I get the dreaded seq needs a key.. what's the right way to handle it? wrap the contents in a [:<>] ? do something to the component to handle the arguments differently?


(into [:h1] contents) probably.

👏 1
Thomas Meier21:11:25

I've been trying to interop with react and using a component but keep getting Uncaught TypeError: appContext is not a function . I'm translating from

Thomas Meier21:11:01

(defn drag-drop-context
  "Main contexts for drag and drop"
  [:> DragDropContext
   [:> Droppable
    {:droppableId "test"}
    [:div [:p "Hello"]]]])


In the original code, Droppable accepts a function. In your code, you provide it with a Hiccup vector.

👍 1