window-scroll-position:React钩子的窗口滚动位置

时间:2021-05-06 16:16:30
【文件属性】:
文件名称:window-scroll-position:React钩子的窗口滚动位置
文件大小:65KB
文件格式:ZIP
更新时间:2021-05-06 16:16:30
react hook scroll window react-hooks @rehooks/window-scroll-position React钩子的滚动位置 注意:这是使用新的,该可能会更改,直到React 16.7最终版本为止。 您需要在^16.7.0-alpha.0处安装react , react-dom等 安装 yarn add @rehooks/window-scroll-position 用法 import useWindowScrollPosition from '@rehooks/window-scroll-position' function MyComponent ( ) { // optionally you can pass options, those are default: let options = { throttle : 100 , } let position = useWindowScrol
【文件预览】:
window-scroll-position-master
----.travis.yml(139B)
----index.js(1KB)
----test.js(472B)
----package.json(912B)
----example.html(333B)
----index.js.flow(268B)
----LICENSE(1KB)
----example.js(322B)
----index.d.ts(256B)
----.gitignore(31B)
----README.md(748B)
----yarn.lock(229KB)
----test-setup.js(51B)

网友评论