Fork me on GitHub
#reagent
<
2018-02-11
>
sggdfgf15:02:16

is there a way for component to get it's dimensions?

eoliphant15:02:16

HEre’s an article on some techniques and libs that might be useful to you https://blog.logrocket.com/building-size-aware-react-components-b4c37e7d96e7

sggdfgf16:02:26

maybe there is a way to get size from :component-did-mount (fn [comp] function? I am trying to extract the dimensions from here? :thinking_face:

eoliphant16:02:54

I don’t think that works directly absent using a lib. The react-sizeme lib referenced in the blog post might be the closest thing.

sggdfgf16:02:10

is there a way just to fill parent? :thinking_face:

sggdfgf20:02:18

how could I stop on drag propagation on this element: `[:> ChartCanvas {:type "hybrid" :ref (fn [component] (reset! node component)) :seriesName "Wat" :ratio ratio :width width :height height :data trades :onLoadMore onLoadMore :defaultFocus true :xAccessor x-accessor :displayXAccessor x-accessor :xScale (scaleTime) :pointsPerPxThreshold 100 ;:xExtents [(ffirst data) (first (last data))] }` ?