Skip to main content

useIntersectionObserver

Definition

  • useIntersectionObserver is an intersection function which trigger when it reach the targets.

Usage Example

import { useIntersectionObserver } from '@utiliser/react-hooks'

const App = () => {
useIntersectionObserver({
target: '.target',
className: 'popUp', // CSS class which trigger when the target intersect
})

return (
<div>
<div className="target">I pop up</div>
</div>
)
}

export default App