You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(throw (ex-info"Props received were a map. This probably means you're calling your component as a function." {:props o})))
(if-let [props (gobj/get o "helix/props")]
(assoc-some props :children (gobj/get o "children"))
(bean/bean o)))
If I define a factory component, that also uses a HOC which provides props (in this case withTooltip https://airbnb.io/visx/docs/tooltip which the docs say are deprecated but is still used in the examples) then the extra props provided by the HOC aren't included.
Maybe the props need to be bean'd as well?
(merge (bean/bean o) (assoc-some props :children (gobj/get o "children")))
The text was updated successfully, but these errors were encountered:
when you use cljs-factory, it puts the props map passed to the factory function under a single prop "helix/props".
If an HOC adds more props, then it won't be included in that map.
You can see in the snippet you posted that if the props object passed to extract-cljs-props has the "helix/props" key, that it will prefer that over anything else contained in the props object.
I think the right thing to do here is to merge more than just "children" with the helix props map, but I'll have to test that out a bit to make sure it doesn't have any unforeseen consequences.
helix/src/helix/core.cljs
Lines 131 to 137 in 51e758e
If I define a factory component, that also uses a HOC which provides props (in this case withTooltip https://airbnb.io/visx/docs/tooltip which the docs say are deprecated but is still used in the examples) then the extra props provided by the HOC aren't included.
Maybe the props need to be bean'd as well?
The text was updated successfully, but these errors were encountered: