npm install react-infinite-scroll-hook Simple Example importuseInfiniteScrollfrom'react-infinite-scroll-hook';functionSimpleInfiniteList(){const{loading,items,hasNextPage,error,loadMore}=useLoadItems();const[sentryRef]=useInfiniteScroll({loading,hasNextPage,onLoadMore:loadMore,// When there is an error...
React hook for creating infinite scroll components. - react-infinite-scroll-hook/example/examples/InfiniteListWithReverseVerticalScroll.tsx at master · onderonur/react-infinite-scroll-hook
onderonur / react-infinite-scroll-hook Public Notifications Fork 37 Star 457 Commit Permalink demo for reversed horizontally scrolling Browse files main (#22) v5.0.1 … v4.0.0 onderonur committed Apr 4, 2021 1 parent 96a828e commit 49c95f7 Showing 6 changed files with 99...
react-infinite-scroll-hook A simple hook to create infinite scroll components react react-hooks infinite-scroll react-component onderonur• 5.0.1 • 4 months ago • 44 dependents • MITpublished version 5.0.1, 4 months ago44 dependents licensed under $MIT 477,601 ...
We’re excited to introduce the newest addition to our frontend-related open source projects.useInfiniteScrollis a super simple React hook for creating an infinite scroll experience based on theIntersectionObserverAPI. Check the live DEMO. We are taking advantage of this tiny library in ourPipeline...
import useInfiniteScroll from 'react-infinite-scroll-hook'; function InfiniteList({}) { const [items, setItems] = useState([]); const [hasNextPage, setHasNextPage] = useState(); const [loading, setLoading] = useState(false); function SimpleInfiniteList() { const { loading, items, ...
26 changes: 12 additions & 14 deletions 26 example/examples/InfiniteListWithHorizontalScroll.tsx Original file line numberDiff line numberDiff line change @@ -22,20 +22,18 @@ function InfiniteListWithHorizontalScroll() { }); return ( <> <ListContainer ref={rootRef}> <List direction="...
"react": ">=16.8.0" }, "husky": { "hooks": { "pre-commit": "tsdx lint" } }, "name": "react-infinite-scroll-hook", "description": "A simple hook to create infinite scroll components", "author": "onderonur",0 comments on commit 3fd71b3 Please sign in to comment. ...
**Live demo is [here](https://onderonur.github.io/react-infinite-scroll-hook/).** Before **v4**, `useInfiniteScroll` hook would basically check the DOM with an interval and look at the distance between the bottom of your "infinite" component and the bottom of the window. This wa...
const [margin, setMargin] = React.useState<string>(); const infiniteRef = useInfiniteScroll({ loading, // This value is set to "true" for this demo only. You will need to // get this value from the API when you request your items. hasNextPage: true, onLoadMore: handleLoadMore, s...