1.0.2 • Published 3 years ago

@edwardzhou/react-native-smartlist-view v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Easy way to use flatlist.

Install

$ npm install @edwardzhou/react-native-smartlist-view --save

Usage

1.yourFile.js

import React, { Component } from 'react';
import { SmartListView } from '@edwardzhou/react-native-smartlist-view';

export default class MyComponent extends Component {

  render() {
    return (
      <SmartListView
          style={{ flex: 1 }}
          pagination
          renderItem={({ item }) => {
            return (
              <YourCell
                detail={item}
                {...this.props}
              />
            );
          }}
          onRefresh={(...args) => yourInterface(YourParams, ...args)}
          {...this.props}
        />
    );
  }
}

License

MIT