Closed jo-rs closed 9 months ago
We should probably do a pass on the charts sub-package at some point to modernize it.
You don't really want to interface with the IntersectionObserver
outside of an effect though.
Feel free to port over our hook in Force to Palette and update callers, if you are motivated: https://github.com/artsy/force/blob/main/src/Utils/Hooks/useIntersectionObserver.ts
Sorry, I was frustrated when I pushed the last commit, and it was a bit of a mess. As per @dzucconi's comment, I ported over Force's hook.
:rocket: PR was released in @artsy/palette-charts@36.2.0
, @artsy/palette@37.2.0
:rocket:
Switches the
useHasEnteredViewport
hook to use Force's implementation ofIntersectionObserver
instead of the former logic, which was causing issues on Volt V2.Open to other suggestions.