Fork me on GitHub
#reagent
<
2021-11-04
>
Ryan15:11:17

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?

p-himik15:11:27

(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 https://codesandbox.io/s/k260nyxq9v?file=/index.js

Thomas Meier21:11:01

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

p-himik21:11:22

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

👍 1