tkonopka / chsk

Library for dynamic data visualization and story-telling with React
https://tkonopka.github.io/chsk/
MIT License
3 stars 1 forks source link

unobserve the element when the component is unmounted. #2

Closed falsepopsky closed 1 year ago

falsepopsky commented 1 year ago

When the component is unmounted, ResizeObserver it should stop watching the element:

https://github.com/tkonopka/chsk/blob/bf971eaf0320052e0229a25e7ae358aa99e706cf/packages/core/src/charts/Chart.tsx#L57-L67

ResizeObserver.unobserve()

Ends the observing of a specified Element.