Home

Awesome

React Native Animated Flatlist

Animated Flatlist for React-Native

View demo on Snack

<img src="./screenshots/demo.gif" style="margin:auto" height="500" />

Install

npm i -S react-native-animated-flatlist

or

yarn add react-native-animated-flatlist

Usage

Import library

import AnimatedFlatlist from 'react-native-animated-flatlist'

Usage

<AnimatedFlatlist
  items={this.state.data.concat([])}
  id={"id"}
  inAnimation={"fadeIn"}
  outAnimation={"fadeOut"}
  duration={300}
  rowItem={({item}) => (
    <Text>Render Item...</Text>
  )}
/>

Props

NameTypeDescriptionDefault Value
itemsarrayArray of objects to iterate[]
idstringUniq identifier property of object-
inAnimationstringAnimation for newly created item (See react-native-animatable for available animations)fadeIn
outAnimationstringAnimation for deleted item (See react-native-animatable for available animations)fadeOut
durationnubmerAnimation duration300
rowItemfunction({item, index})React component to render Item with item and index params-

Also you can use React-native Flatlist props

Credits

https://github.com/oblador/react-native-animatable