• Stars
    star
    520
  • Rank 85,117 (Top 2 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a high performance list view for React Native with support for complex layouts using a similar FlatList usage to make easy the replacement. This list implementation for big list rendering on React Native works with a recycler focused on performance and memory usage and so it permits processing thousands items on the list.
React Native Big List

If this project has helped you out, please support us with a star 🌟


NPM version js-prittier-style Compatibility

Documentation

📘 Description

What is this?

This is a high performance list view for React Native with support for complex layouts using a similar FlatList usage to make easy the replacement. This list implementation for big list rendering on React Native works with a recycler focused on performance and memory usage and so it permits processing thousands items on the list.

You can also try it on the published web app: Demo

Why another list library?

React Native's FlatList is great but when it comes to big lists it has some flaws because of its item caching. Exists some alternatives like react-native-largelist and recyclerlistview but both have some issues.

The react-native-largelist isn't compatible with web and Expo, has native code that sometimes need to be readjusted and maintained, have a weird list item recycles (because it never has blank items), need data restructure and have some issues when trying to process a lot of data (eg: 100,000 items) because it would freeze the CPU.

The recyclerlistview is performant but suffers from an empty frame on mount, weird scroll positions when trying to scroll to an element on mount, and the implementation of sticky headers conflicts with Animated.

How it works?

Recycler makes it easy to efficiently display large sets of data. You supply the data and define how each item looks, and the recycler library dynamically creates the elements when they're needed. As the name implies, the recycler recycles those individual elements. When an item scrolls off the screen, the recycler doesn't destroy its view. Instead, the recycler reuses the view for new items that have scrolled onscreen. This reuse vastly improves performance, improving your app's responsiveness and reducing power consumption.

When list can't render your items fast enough the non-rendered components will appear as blank space.

This library is fully JS native, so it's compatible with all available platforms: Android, iOS, Windows, MacOS, Web and Expo.

📖 Install

Install the library from npm or yarn just running one of the following command lines:

npm yarn
npm install react-native-big-list --save yarn add react-native-big-list

💻 Usage

Read also How to migrate from FlatList

Basic example:

import BigList from "react-native-big-list";
// ...
const MyExample = ({ data }) => {
  const renderItem = ({ item, index }) => <MyListItem item={item} />;
  return <BigList data={data} renderItem={renderItem} itemHeight={50} />;
};

For more examples check the example directory the list directory or check the Documentation

🎨 Screenshots

BigList vs FlatList Section List

⚡️ Example

Snippets

Expo

Clone or download repo and after:

cd Example
yarn install # or npm install
expo start

Open Expo Client on your device. Use it to scan the QR code printed by expo start. You may have to wait a minute while your project bundles and loads for the first time.

You can also try it on the published web app: Demo

💡 Props and Methods

The list has the same props of the ScrollView in addition to its specific Props and Methods.

🤔 How to contribute

Have an idea? Found a bug? Please raise to ISSUES or PULL REQUEST. Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.


More Repositories

1

PHP-Antimalware-Scanner

AMWScan (PHP Antimalware Scanner) is a free tool to scan php files and analyze your project to find any malicious code inside it.
PHP
557
star
2

react-native-input-spinner

An extensible input number spinner component for react-native highly customizable. This component enhance a text input for entering numeric values, with increase and decrease buttons.
JavaScript
386
star
3

php-conventional-changelog

A PHP tool built to generate a changelog from a project's commit messages and metadata following the conventionalcommits.org and automate versioning with semver.org.
PHP
217
star
4

Database-Web-API

Dynamically generate RESTful APIs from the contents of a database table. Provides JSON, XML, and HTML. Supports most popular databases
PHP
42
star
5

PHP-AIO-Security

The objective of this class is offer an automatic system of protection for developers's projects and simplify some security operations as the check of CSRF or XSS all in a simple class. Infact you could just call the main method to have better security yet without too much complicated operations.
PHP
37
star
6

dotenv-mono

This package permit to have a centralized dotenv on a monorepo. It also includes some extra features such as manipulation and saving of changes to the dotenv file, a default centralized file, and a file loader with ordering and priorities.
TypeScript
35
star
7

PHP-Light-SQL-Parser

This class can parse SQL to get query type, tables, field values, etc.. It takes an string with a SQL statements and parses it to extract its different components. Currently the class can extract the SQL query method, the names of the tables involved in the query and the field values that are passed as parameters. This parser is pretty light respect phpsqlparser or others php sql parser.
PHP
28
star
8

PHP-Malware-Collection

Collection of php malware/backdoors/shell
PHP
27
star
9

react-native-input-validator

This library validates strings and number passed on TextInput component and highlight the result (valid green, invalid red). Optionally can have a placeholder with floating labels.
JavaScript
14
star
10

PHP-Markdown-Docs

This package can convert PHPDoc comments from classes into Markdown. It can parse a class file with a given file name and extracts the documentation of its functions and variables that it may contain in PHPDoc format. The package can convert the extracted documentation into a file in Markdown format.
PHP
14
star
11

PHP-Minifier

This class can minify HTML, JavaScript and CSS to take less space. It can take a string with either HTML, JavaScript or CSS, and parses it to eliminate unnecessary text. The class returns as result a a string that is smaller than the original.
PHP
12
star
12

Shell-BotKiller

We'll post findings from an infected confluence-systems we investigated recently, to show how it looks/feel like. the most systems we took a look at were infected with mining-bots like kerberods.
Shell
4
star
13

PHP-CPDO

This package can retrieve PDO query results from cache variables. It extends the base PDO class and override some functions to handle database query execution and store the query results in variables. The class can also return query results for cached queries for previously executed queries to retrieve the results faster for repeated queries.
PHP
4
star
14

marcocesarato

2
star
15

react-native-big-list-docs

HTML
1
star