npm.io
1.0.2 • Published 5 years ago

@edwardzhou/react-native-smartlist-view

Licence
ISC
Version
1.0.2
Deps
0
Size
5 kB
Vulns
0
Weekly
0

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

Keywords