use-scroll-to-bottom:当您滚动到底部时,React Hook会告诉您

时间:2021-03-12 18:25:21
【文件属性】:
文件名称:use-scroll-to-bottom:当您滚动到底部时,React Hook会告诉您
文件大小:337KB
文件格式:ZIP
更新时间:2021-03-12 18:25:21
react typescript bottom intersection-observer react-hooks 底部使用滚动 当您滚动到底部时,React Hook会告诉您 使用因此请确保您可以支持它。 安装 npm install --save use-scroll-to-bottom 用法 钩子返回两个元素的元组: 一个RefCallback,它需要放在滚动容器的最后一个元素上。 一个布尔值,它告诉您是否已达到底部。 查看和 import React from 'react' ; import { useScrollToBottom } from 'use-scroll-to-bottom' export default function MyComponent ( ) { // isBottom will be true when bottom is reached // add setBottomRef to the last element in your scrolling
【文件预览】:
use-scroll-to-bottom-master
----.gitignore(324B)
----.eslintrc(600B)
----package.json(2KB)
----package-lock.json(695KB)
----src()
--------.eslintrc(36B)
--------index.test.tsx(4KB)
--------index.tsx(702B)
--------typings.d.ts(129B)
----.prettier.json(170B)
----.travis.yml(41B)
----LICENSE(1KB)
----tsconfig.json(825B)
----.github()
--------workflows()
----README.md(2KB)
----example()
--------package.json(959B)
--------package-lock.json(620KB)
--------src()
--------public()
--------README.md(199B)
----.eslintignore(55B)
----test()
--------utils.js(708B)
----tsconfig.test.json(87B)
----.editorconfig(147B)

网友评论