Fork me on GitHub
Andrew Watts02:05:50

I'm having an issue with (I think) reagent recently. I'm not sure if it's a bug or if I'm doing something wrong. The minimal example of what I'm seeing is here:

Andrew Watts02:05:31

Run boot dev and go to to see it break.

Andrew Watts02:05:27

essentially, it's a minimal reagent app, but it crashes upon the first render because the cljs compiler mangled the name of the ReactDOM.render method.


Hi, has anyone know the rules about the components that takes components as argument.


I have an issue with re-drawing the high-order component.


can you show your code?


in general you just need to make sure your higher-order component returns the hiccup appropriately



(defn my-hoc [foo bar & children]
  ;; we need to make sure that child components are rendered in valid hiccup
  ;; `into` will append `children` to the vector we are returning
    [:div "foo"] [:div "bar]]


I am so sorry for the silly question. Here is the trick, Reagent components --Technichally, everything in Clojure/Script-- are functions. I had give the processed reagent element as an argument. If anyone falls this trick. Just return an acceptable reagent element, so Function!