All Projects → sarons → react-recycled-scrolling

sarons / react-recycled-scrolling

Licence: MIT License
Simulate normal scrolling by using only fixed number of DOM elements for large lists of items with React Hooks

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to react-recycled-scrolling

vue-virtual-stream
Simple vue-virtualized package for Vue.js
Stars: ✭ 16 (-38.46%)
Mutual labels:  list, listview, virtualization
recyclerview-list-drag-and-drop
No description or website provided.
Stars: ✭ 50 (+92.31%)
Mutual labels:  list, listview, recyclerview
React Gridlist
A virtual-scrolling GridList component based on CSS Grids
Stars: ✭ 394 (+1415.38%)
Mutual labels:  list, listview, scrolling
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+376.92%)
Mutual labels:  list, listview, recyclerview
React Virtualized
React components for efficiently rendering large lists and tabular data
Stars: ✭ 22,963 (+88219.23%)
Mutual labels:  list, listview, virtualization
InfiniteScroll
You can do a Endless scroll in ListView or RecyclerView with simple steps, with a listener for do request to your web service.
Stars: ✭ 28 (+7.69%)
Mutual labels:  listview, recyclerview
GenericAdapter
⛳️ Easy to use android databinding ready recyclerview adapter
Stars: ✭ 26 (+0%)
Mutual labels:  listview, recyclerview
android-page
android 分页列表数据加载引擎,主要封装了android分页列表数据加载的各个组件,如果你有一个需要分页加载的List列表,都可以使用此框架实现。
Stars: ✭ 15 (-42.31%)
Mutual labels:  listview, recyclerview
volx-recyclerview-fast-scroll
An easy to use implementation for fast scroll recyclerview
Stars: ✭ 34 (+30.77%)
Mutual labels:  recyclerview, scrolling
tiny-ui
⚛️ A friendly UI component set for React.js
Stars: ✭ 202 (+676.92%)
Mutual labels:  react-component, react-hooks
GenericRecyclerAdapter
Easiest way to use RecyclerView. Reduce boilerplate code! You don't need to write adapters for listing pages anymore!
Stars: ✭ 53 (+103.85%)
Mutual labels:  listview, recyclerview
react-daterange-picker
A react date range picker to using @material-ui. Live Demo: https://flippingbitss.github.io/react-daterange-picker/
Stars: ✭ 85 (+226.92%)
Mutual labels:  react-component, react-hooks
TwerkyListView
A beautifully animated recycler-list-view, that twerks the way African earthworms do in order to move
Stars: ✭ 19 (-26.92%)
Mutual labels:  listview, recyclerview
PinnedSectionRecyclerView
simple RecyclerView with pinned sections for Android.
Stars: ✭ 21 (-19.23%)
Mutual labels:  listview, recyclerview
react-native-nested-listview
A UI component for React Native for representing nested arrays of N levels
Stars: ✭ 163 (+526.92%)
Mutual labels:  listview, react-component
fluent-windows
🌈 React components that inspired by Microsoft's Fluent Design System.
Stars: ✭ 122 (+369.23%)
Mutual labels:  react-component, react-hooks
kandy
Sweet Android libraries written in Kotlin
Stars: ✭ 19 (-26.92%)
Mutual labels:  listview, recyclerview
react-native-nlist
原生Listview Native lListView react-native encapsulation Memory recovery reusing High performance
Stars: ✭ 60 (+130.77%)
Mutual labels:  listview, recyclerview
whatsapp-clone-react
Build a WhatsApp Clone with React JS and FireBase.
Stars: ✭ 38 (+46.15%)
Mutual labels:  react-component, react-hooks
react-scroll-trigger
📜 React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: ✭ 126 (+384.62%)
Mutual labels:  react-component, scrolling

React Recycled Scrolling

npm Build Status Coverage Status

Simulate normal scrolling by using only fixed number of DOM elements for large lists of items with React Hooks

Install

npm install --save react-recycled-scrolling

Usage

All that is required is

  • attrList: A list of items
  • itemFn: A React functional component or even just a function that returns jsx for each element
const numberList = []
for (let i = 1; i <= 20000; i++) numberList.push(i)
const SheepRow = (no) => (<div> {no} Sheep </div>)

Then just drop in your RecycledList wherever you need it

import RecycledList from 'react-recycled-scrolling'

<RecycledList
itemFn = {SheepRow}
attrList = {numberList}
/>

Additional parameters are

  • itemHeight: Height of each item, Default: 50
  • rowOffset: How many buffer rows you need outside the viewable screen, Default: 6
  • className: custom CSS for the outer scroll wrapper. You must have {position: relative} for recycled scroll to work
<RecycledList
  itemFn = {SheepRow}
  attrList = {numberList}
  itemHeight = {120}
  rowOffset = {10}
  className = {'CustomContainer'}
/>

Example

Edit jovial-haibt-y8mlf

https://codesandbox.io/s/jovial-haibt-y8mlf?fontsize=14

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].