React Cool Inview Versions Save

😎 🖥️ React hook to monitor an element enters or leaves the viewport (or another element).

v3.0.1

2 years ago
  • Fix: expose InView type (#792)

v3.0.0

2 years ago

💥 Breaking Change

  • Use named export instead of default export to import the hook.
- import useInView from "react-cool-inview";
+ import { useInView } from "react-cool-inview";

✨ New Feature

  • Supports InView component, see the example to learn more (thanks to @max-sym)

v2.0.9

2 years ago
  • Fix: only setState when active/mounted (#736)

v2.0.8

2 years ago
  • Fix: correct the type of root (#672).

v2.0.7

2 years ago

Refactor(types): enhance the types of event properties (#561)

v2.0.6

3 years ago
  • Refactor(types): export more types to fulfill your use cases (#558)

v2.0.5

3 years ago
  • Refactor(types): simplify generic variable
-  const { observe } = useInView<HTMLDivElement | null>();
+  const { observe } = useInView<HTMLDivElement>();

v2.0.4

3 years ago
  • Fix: infinite re-rendering (#521) (#520)

v2.0.3

3 years ago
  • Fix: the values of the scrollDirection will sync with the scrolling direction of the viewport, see doc (#499)

v2.0.2

3 years ago
  • Fix: align the values of the scrollDirection with the direction of the viewport (#499)
  • Fix: un-observe the previous target element when updating the new target element via the observe API (#500)