UNPKG

use-element-in-view

Version:

A simple React hook to track whether an element is visible in the viewport with the Intersection Observer. This API provides a native way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-leve

9 lines (6 loc) 216 B
'use strict' if (process.env.NODE_ENV === 'production') { module.exports = require('./use-element-in-view.cjs.production.min.js') } else { module.exports = require('./use-element-in-view.cjs.development.js') }