react-intersection-observer
Advanced tools
Comparing version 9.4.2 to 9.4.3
@@ -49,5 +49,8 @@ import * as React from 'react'; | ||
* Render the wrapping element as this element. | ||
* This needs to be an intrinsic element. | ||
* If you want to use a custom element, please use the useInView | ||
* hook to manage the ref explicitly. | ||
* @default `'div'` | ||
*/ | ||
as?: React.ElementType; | ||
as?: keyof JSX.IntrinsicElements; | ||
/** Call this function whenever the in view state changes */ | ||
@@ -54,0 +57,0 @@ onChange?: (inView: boolean, entry: IntersectionObserverEntry) => void; |
{ | ||
"name": "react-intersection-observer", | ||
"version": "9.4.2", | ||
"version": "9.4.3", | ||
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API", | ||
@@ -5,0 +5,0 @@ "source": "./src/index.tsx", |
@@ -5,3 +5,3 @@ # react-intersection-observer | ||
[![GZipped size][npm-minzip-svg]][bundlephobia-url] | ||
[![Test][test-image]][test-url] | ||
[![Test][test-image]][test-url] | ||
[![License][license-image]][license-url] | ||
@@ -171,3 +171,3 @@ [![Downloads][downloads-image]][downloads-url] | ||
| ------------ | ---------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ||
| **as** | `string` | `'div'` | Render the wrapping element as this element. Defaults to `div`. | | ||
| **as** | `IntrinsicElement` | `'div'` | Render the wrapping element as this element. Defaults to `div`. If you want to use a custom component, please use the `useInView` hook or a render prop instead to manage the reference explictly. | | ||
| **children** | `({ref, inView, entry}) => ReactNode` or `ReactNode` | `undefined` | Children expects a function that receives an object containing the `inView` boolean and a `ref` that should be assigned to the element root. Alternatively pass a plain child, to have the `<InView />` deal with the wrapping element. You will also get the `IntersectionObserverEntry` as `entry`, giving you more details. | | ||
@@ -174,0 +174,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
215108
2062