useIntersectionObserver API Reference
The useIntersectionObserver hook takes a ref and an options object. It returns a tuple or object containing:
entry: AnIntersectionObserverEntry | nullobject providing detailed information about the intersection of the target with the root (e.g.,isIntersecting).