🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-native-section-list

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-section-list

The react-native-section-list package is a library for React Native applications that simplifies the rendering and handling of lists. It provides a customizable component, SectionList, which allows you to display and iterate through a list of items, along

0.0.3
latest
Source
npm
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Section List

The react-native-section-list package is a library for React Native applications that simplifies the rendering and handling of lists. It provides a customizable component, SectionList, which allows you to display and iterate through a list of items, along with optional heading and item rendering functionalities.

React Native SectionList Example

Installation

Download the package with npm or yarn

npm install react-native-section-list

In order for react-native-section-list to work, you also need to install the moment

npm install moment  

Usage

import SectionList from 'react-native-section-list';
 <SectionList
        jsonKey={'category'}
        isDate={true}
        containerStyle={styles.container}
        childContainerStyle={undefined}
        data={DATA}
        renderHeading={(title) => (
          <Text style={styles.headerText}>{title}</Text>
        )}
        renderItem={({ item, index }: { item: any; index?: number }) => (
          <Text key={index}>{JSON.stringify(item)}</Text>
        )}
      />

Props

All the FlatList props can be passed.

PropTypeDescription
jsonKeystringExtracts unique identifiers from the data (Required)
isDatebooleanindicates whether to sort data by date.
containerStyleViewStyleStyling for the main container that holds the list.
childContainerStyleViewStyleAdditional styling for the child container that wraps
renderHeadingReact.FC<any>renders each item in the list .
dataArray<any>An array of data to render in the FlatList (Required)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 23 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts