Fork me on GitHub

@colindresj I'm not entirely sure of your requirement, but remember that hiccup is just about vectors and maps


It's just data. <--- this is where the power comes from. And you can construct those vectors and maps in whatever way you want, using the full capabilities of clojurescript.


When you rerender children you can quite literately merge in new props into the map


(defn view 
  (let [extra-style   (when  with-extras?   {:background-color "blue"})]
    [:div  {:style  (merge extra-style {:font-size "14px"})}   
     (when with-extras? " extra child")]))
So here, if with-extras? becomes true, the props for the child change.


@mattsfrey not had that problem. Post the offending style in here. Might be easy to see the problem


That’s close to what I’m doing @mikethompson, but I happen to be passing in a children into the parent component. Because it’s written out as a vector, the child component is instantiated by Reagent as a React element. Within the parent component, the child is represented as a vector of [<reactElement> <map of props>]. So, I’ve been merging the second item in the vector with my additional props, and that seems to be working, but just wanted to make sure I wasn’t missing something


Here’s a simplified example:

(defn parent-component [props [child-element child-props]]
  (let [merged-props (r/merge-props child-props {:my “props”})]
    [child-element merged-props]))