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
75 lines (74 loc) • 1.7 kB
JSON
{
"version": "1.0.3",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"engines": {
"node": ">=10"
},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"test": "tsdx test",
"test:watch": "tsdx test --watch",
"lint": "tsdx lint",
"prepare": "tsdx build",
"prepublishOnly": "npm run test && npm run lint",
"preversion": "npm run lint"
},
"peerDependencies": {
"react": ">=16"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run test"
}
},
"lint-staged": {
"*.{js,ts,tsx}": [
"npm run lint",
"prettier --write"
]
},
"repository": {
"type": "git",
"url": "https://github.com/joshuaaron/use-element-in-view.git"
},
"homepage": "https://github.com/joshuaaron/use-element-in-view",
"name": "use-element-in-view",
"author": "Josh Reynolds",
"module": "dist/use-element-in-view.esm.js",
"devDependencies": {
"@testing-library/react": "11.1.0",
"@testing-library/react-hooks": "3.4.2",
"@types/react": "16.9.52",
"@types/react-dom": "16.9.8",
"eslint": "7.11.0",
"eslint-config-tsdx": "0.2.0",
"eslint-plugin-react-hooks": "4.1.2",
"husky": "4.3.0",
"lint-staged": "10.4.0",
"prettier": "2.1.2",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-test-renderer": "16.14.0",
"tsdx": "0.14.0",
"tslib": "2.0.3",
"typescript": "4.0.3"
},
"keywords": [
"react",
"reactjs",
"react-hooks",
"hooks",
"hook",
"intersection-observer",
"inview",
"observe-element",
"react-intersection",
"react-observer"
]
}