1.0.1 • Published 9 years ago
react-native-list v1.0.1
FlatList, VirtualizedList, SectionList for React-Native < 0.43
This repository mimics the latest changes in React Native 0.43.
Motivation
Currently, React-Native@0.43 depends on React@16.0.0-alpha6 which isn't yet supported by many libraries like Enzyme etc. Although, this version of RN brings us amazing list views: FlatList, VirtualizedList & SectionList. So there is a choice either to use 0.43 with its awesome lists or use 0.42 and being able to test your applications with Enzyme. Well, I choose both ;)
This package contains copied and adapted implementation of 0.43 list features to < 0.43 realms.
Installation
Install package using your favorite manager:
yarn add react-native-listor
npm add react-native --saveAdd
react-native-listto yourprovidesModuleNodeModules:- If you don't have
rn-cli.config.js, creatern-cli.config.jsin the root directory of your project:
module.exports = { getProvidesModuleNodeModules() { return [ 'react-native', 'react-native-windows', 'react-native-list', ]; }, };- If you already have
rn-cli.config.js, addreact-native-listto yourgetProvidesModuleNodeModulesfunction or copy it from the snippet above.
- If you don't have
Usage
import { FlatList, VirtualizedList, SectionList } from 'react-native-list';
// then use it like a regular react-native@0.43 componentsFor more information, see Better List Views in React Native.