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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-dynamic-flatlist

v1.0.1

Published

A customizable UI library for React Native that includes a dynamic status bar, loaders, shimmer effects, scrollable and non-scrollable views, an empty state handler, and a bottom sheet implementation.

Downloads

4

Readme

React Native Dynamic Flatlist Library

A powerful and dynamic FlatList wrapper for React Native that provides enhanced functionality out of the box. This library simplifies creating complex lists with features like pagination, sorting, grid layouts, search.

Features

  • Normal List: Render a standard vertical or horizontal list.
  • Pagination: Load data incrementally as the user scrolls.
  • Sorting: Dynamic sorting options:
    • A to Z
    • Z to A
    • 1 to Nth (ascending numerical order)
    • Nth to 1 (descending numerical order)
  • Sorting with Pagination: Combine sorting and pagination for large datasets.
  • Vertical List: Default vertical scrolling list.
  • Horizontal List: Render items in a horizontally scrollable list.
  • Grid Layout: Support for dynamic number of columns in a grid layout.
  • Search Bar: Include a TextInput for search functionality at the top of the list.
  • Search with Pagination: Filter and paginate data simultaneously.

Installation

Install the library via npm:

npm install react-native-dynamic-flatlist

Or with Yarn:

yarn add react-native-dynamic-flatlist

Usage

Basic Example

import React from "react";
import { View, Text, StyleSheet } from "react-native";
import CustomFlatList from "react-native-dynamic-flatlist";

const App = () => {
  const data = [...Array(50).keys()].map((i) => ({ id: i, name: `Item ${i}` }));

  const renderItem = ({ item }) => (
    <View style={styles.item}>
      <Text>{item.name}</Text>
    </View>
  );

  return (
    <CustomFlatList
      data={data}
      renderItem={renderItem}
      keyExtractor={(item) => item.id.toString()}
    />
  );
};

const styles = StyleSheet.create({
  item: {
    padding: 10,
    borderWidth: 1,
    borderColor: "#ccc",
    margin: 5,
  },
});

export default App;

Advanced Usage

Pagination

<CustomFlatList
  data={data}
  renderItem={renderItem}
  paginationEnabled={true}
  onPaginate={(page, currentData) => {
    // Fetch the next set of data based on `page` and return updated data
    return [...currentData, ...fetchNewData(page)];
  }}
/>

Sorting

<CustomFlatList
  data={data}
  renderItem={renderItem}
  sortingOptions={["a-to-z", "z-to-a", "1-to-n", "n-to-1"]}
  onSort={(option, data) => {
    if (option === "a-to-z") {
      return data.sort((a, b) => a.name.localeCompare(b.name));
    }
    if (option === "z-to-a") {
      return data.sort((a, b) => b.name.localeCompare(a.name));
    }
    return data;
  }}
/>

Grid Layout

<CustomFlatList data={data} renderItem={renderItem} layout="grid" columns={3} />

Search with Pagination

<CustomFlatList
  data={data}
  renderItem={renderItem}
  searchEnabled={true}
  onSearch={(query, data) => {
    return data.filter((item) =>
      item.name.toLowerCase().includes(query.toLowerCase())
    );
  }}
  paginationEnabled={true}
  onPaginate={(page, currentData) => {
    // Fetch and return paginated data based on search query
    return [...currentData, ...fetchSearchResults(query, page)];
  }}
/>

Props

| Prop | Type | Default | Description | | ------------------- | -------- | --------- | -------------------------------------------------------- | | data | Array | [] | The data to render in the list. | | renderItem | Function | undefined | A function that returns a component to render each item. | | keyExtractor | Function | undefined | A function to extract unique keys for each item. | | paginationEnabled | Boolean | false | Enable or disable pagination. | | sortingOptions | Array | null | Array of sorting options. | | searchEnabled | Boolean | false | Enable or disable the search bar. | | layout | String | vertical | Layout type (vertical, horizontal, grid). | | columns | Number | 1 | Number of columns for grid layout. | | onSearch | Function | null | Callback function for search functionality. | | onSort | Function | null | Callback function for sorting. | | onPaginate | Function | null | Callback function for pagination. |

License

This library is licensed under the MIT License.

🔍 Keywords

  • react-native
  • scrollView
  • view
  • loader
  • pagination
  • sorting
  • horizontal
  • vertical
  • grid
  • search