Mirror scroll lists for React Native
yarn add rn-mirror-lists
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
/>
You can run the exmaple app on /example
folder.
cd example && yarn start
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Akinn Rosa - Github - [email protected]