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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-arraylist-view

v0.1.12

Published

This library is a simple and efficient library for rendering arrays of data in a scrollable list view in React Native. This library takes an array of data and automatically generates a list view, making it an ideal solution for displaying dynamic content

Readme

react-native-arraylist-view

npm version npm total downloads license MIT

Table of Contents

Description

react-native-arraylist-view is a simple and efficient library for rendering arrays of data in a scrollable list view in React Native. This library takes an array of data and automatically generates a list view, making it an ideal solution for displaying dynamic content such as contact lists, to-do items, and product catalogs.

The component is flexible and can be customized easily with props to modify how the list and its items are rendered, including optional edit and delete buttons for interaction. Whether you're building a small app or handling large datasets, this library is optimized for performance and ease of use.

Installation

Install the library using npm or yarn:

npm install react-native-arraylist-view --save

or

yarn add react-native-arraylist-view

Usage

To use react-native-arraylist-view, simply import the component and pass an array of data to it. You can also customize the appearance of each list item through the renderItem function and use additional props to control the display of edit and delete buttons.

Example

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import ArrayListView from 'react-native-arraylist-view';

// Sample data for rendering in the list
const data = [
  {
    id: '1',
    name: 'John Doe',
    age: 30,
    isDeleted: true,
    isEdited: true,
    images: [
      {
        'before Image':
          'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
        'after Image':
          'https://pixabay.com/images/download/people-2944065_640.jpg',
      },
    ],
  },
  {
    id: '2',
    name: 'Jane Smith',
    age: 25,
    isDeleted: false,
    isEdited: true,
    images: [
      {
        'before Image':
          'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
        'after Image':
          'https://pixabay.com/images/download/people-2944065_640.jpg',
      },
    ],
  },
  {
    id: '3',
    name: 'Alice Johnson',
    age: 35,
    isDeleted: true,
    isEdited: false,
    images: [
      {
        'before Image':
          'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
        'after Image':
          'https://pixabay.com/images/download/people-2944065_640.jpg',
      },
    ],
  },
];

const App = () => {
  return (
    <View style={{ flex: 1, padding: 10 }}>
      <ArrayListView
        arrayData={data}
        isEdited={true}
        isDeleted={true}
        onSelectEdit={(item) => console.log('Edit clicked on:', item)}
        onSelectDelete={(item) => console.log('Delete clicked on:', item)}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  row: {
    padding: 10,
    marginBottom: 10,
    borderWidth: 1,
    borderColor: '#ddd',
    borderRadius: 5,
  },
  rowLabel: {
    fontSize: 18,
    fontWeight: 'bold',
  },
  rowValue: {
    fontSize: 14,
    color: '#555',
  },
});

export default App;

Sample Data

This is an example of how your data should be structured. You can pass any array of objects with any shape to the component.

const data = [
  {
    id: '1',
    name: 'John Doe',
    age: 30,
    isDeleted: false,
    isEdited: false,
    image: [
      {
        'before Image':
          'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
        'after Image':
          'https://pixabay.com/images/download/people-2944065_640.jpg',
      },
    ],
  },
  {
    id: '2',
    name: 'Jane Smith',
    age: 25,
    isDeleted: true,
    isEdited: false,
    image: [
      {
        'before Image':
          'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
        'after Image':
          'https://pixabay.com/images/download/people-2944065_640.jpg',
      },
    ],
  },
  {
    id: '3',
    name: 'Alice Johnson',
    age: 35,
    isDeleted: true,
    isEdited: true,
    image: [
      {
        'before Image':
          'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
        'after Image':
          'https://pixabay.com/images/download/people-2944065_640.jpg',
      },
    ],
  },
];

Properties

ListView

| Prop | Default | Type | Description | Required/Optional | | -------------- | ------- | --------- | ------------------------------------------------------------------------ | ----------------- | | arrayData | [] | Array | Array of objects to be displayed | Required | | hidden | [] | Array | Array of keys to be hidden from display | Optional | | borderColor | #000000 | String | Border color for styling | Optional | | isEdited | false | Boolean | Determines if the edit button is shown | Optional | | isDeleted | false | Boolean | Determines if the delete button is shown | Optional | | onSelectEdit | - | Function | Callback function triggered when an item is edited | Optional | | onSelectDelete | - | Function | Callback function triggered when an item is deleted | Optional | | deleteImage | - | - | Delete button icon image source | Optional | | editImage | - | - | Edit button icon image source | Optional | | listHeader | - | Component | Custom component to be displayed at the list header | Optional | | itemSeperator | - | Component | Custom separator between list items | Optional | | listFooter | - | Component | Custom component to be displayed at the list footer | Optional | | onEndReached | - | Component | Callback function triggered when reaching the end of the list | Optional | | endThreshold | - | Component | Defines how close to the end of the list before onEndReached is called | Optional | | refreshControl | - | Component | Refresh control for pull-to-refresh functionality | Optional |

Style Props

| Prop | Description | Type | | --------------------------- | --------------------------------------------------- | ------ | | itemCardStyle | Custom style for each item card | Object | | containerStyle | Custom style for the container | Object | | rowStyle | Custom style for each row | Object | | rowLabelContainerStyle | Custom style for row labels container | Object | | rowLabelStyle | Custom style for row labels | Object | | rowValueContainerStyle | Custom style for row values container | Object | | rowValueStyle | Custom style for row values | Object | | iconButtonStyle | Custom style for icon buttons | Object | | iconImageStyle | Custom style for images inside icon buttons | Object |

Contributing

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

License

MIT