npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@asdotdev/react-list

v0.1.0

Published

This library provides a scrollable interface for rendering infinite lists.

Downloads

6

Readme

@asdotdev/react-list

This library provides a scrollable interface for rendering lists in <FatList /> for the need of section support, use <SectionList />, along with features like

  • Infinite Scroll
  • Header / Footer
  • Vertical / Horizontal
  • Inverted
  • Sticky

Before you start!

I want to enhance this library and would love to hear your feedback on whether it needs improvement, has bugs, features to be added in the next version or anything else. Your input is crucial in guiding the development, so please share your ideas on the additions or changes you'd like to see. Read the Contributing Guide

Installation

npm i @asdotdev/react-list

yarn add @asdotdev/react-list

pnpm add @asdotdev/react-list

bun add @asdotdev/react-list

Props

Note: Asterisk (*) in props column represent required field. | Prop | type | | Description | Default | | ----------------- | --------------------------------------- | ------------------------ | ---------------------------------------------------- | ------- | | | FlatList | SectionList | | | | data * | Array<ItemT> | Array<SectionT<ItemT>> | List of data to render | undefined | | renderItem * | (info: ItemProps<ItemT>) => ReactNode | | Node to renders each item into the list | undefined | | keyExtractor | (info: ItemProps<ItemT>) => string | | Unique ID to pass each item | index | | horizontal | boolean || Renders the list horizontally | false | | inverted | boolean || Inverted render of the entire list | false | | hideScrollabar | boolean || Whether to show the list scrollbar or not | false | | width | CCSSProperties["width"] || Width of the list | undefined | | height | CCSSProperties["height"] || Height of the list | undefined | | background | CCSSProperties["background"] || Background of the list| undefined | | gapBetweenItems | CCSSProperties["gap"] || Space between the items on the list | undefined | | initialScrollIndex | number || Scroll to the item (section in SectionList) at the index | undefined | | onEndReached | function || Function to execute on reaching the end of the list | undefined | | onEndReachedIgnored | boolean || Ignore observing whether the end of the list is reached or not | false | | onEndReachedThreshold | number || Run onEndReached before reaching the end of the list (0 - 1) | 0 | | noOfItems | number || Number of items in each row (column when horizontal) | 1 | | loading | boolean || Prevent calling onEndReached until the last call is completed and show the end loader component | undefined | | ListLoadingComponent | ReactElement \| ReactNode || Component to appear at the end of the list while loading | undefined | | ListHeaderComponent | ReactElement \| ReactNode || Component to appear at the start of the list | undefined | | ListFooterComponent | ReactElement \| ReactNode || Component to appear at the end of the list | undefined | | ListEmptyComponent | ReactElement \| ReactNode || Component to appear when data has no element | undefined | | ListSkeletonComponent | ReactElement \| ReactNode || Component to appear on initial load of the list (also need loading prop) | undefined | | stickyListHeaderEnabled | boolean || Stick the header at the start of the list when scrolling | false | | stickyListFooterEnabled | boolean || Stick the footer at the end of the list when scrolling | false | | stickyItemsIndices | Array<number> | NA | Stick the items on each index of the list when scrolling | undefined | | stickItemsAt | start \| end \| both | NA | Stick the items at the start \ end \ both of the list | start | | stickySectionTitleEnabled | NA | boolean | Stick the title of each section at the start of the list when scrolling | false | | coustomSectionTitle | NA | (info: SectionProps<ItemT>) => ReactNode | Node to render in place of default section title component for each section title | undefined |

Contributing Guide

Read the CONTRIBUTING file to learn about our development process, how to propose bugfixes and improvements.

License

@asdotdev/react-list is MIT licensed, as found in the LICENSE file.