If using this on elements inside a scrollable div, you need to pass the root prop in order for the offset to work correctly. Otherwise offset is "ignored" and elements are only "visible" when they are actually visibile.
We just need a new root prop of type Element that can be passed optionally to the IntersectionObserver constructor
If using this on elements inside a scrollable div, you need to pass the root prop in order for the offset to work correctly. Otherwise offset is "ignored" and elements are only "visible" when they are actually visibile.
We just need a new
root
prop of type Element that can be passed optionally to the IntersectionObserver constructor