1.2.0 • Published 4 years ago

rn-mirror-lists v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

rn-mirror-lists

Mirror scroll lists for React Native

Installation

yarn add rn-mirror-lists

Usage

import { MirrorLists } from 'rn-mirror-lists';

// ...

const data = [
  {
    id: 1,
    image: 'https://avatars.githubusercontent.com/u/42688281?v=4',
    description: 'This guy is really amazing',
  },
];

// ...

<MirrorLists
  data={data}
  keyExtractor={({ item }) => item.id.toString()}
  horizontalRenderItem={({ item }) => (
    <Image
      source={{ uri: item.image }}
      style={{
        width: 64,
        height: 64,
        marginHorizontal: 12,
        marginVertical: 8,
        borderRadius: 32,
      }}
    />
  )}
  verticalRenderItem={({ item }) => (
    <Text>{item.description}</Text>
  )}
  reverse={false} // optional
/>

Example App

You can run the exmaple app on /example folder.

cd example && yarn start

Contributing

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

License

MIT

Contact

Akinn Rosa - Github - akinncar@hotmail.com

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago