Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

272 B
Raw Blame
import { useIntersectionObserver } from "@uidotdev/usehooks";

export const useInView = () => {
  const [ref, entry] = useIntersectionObserver({
    threshold: 0,
    root: null,
    rootMargin: "0px",
  });

  return {
    ref,
    inView: entry?.isIntersecting,
  };
};