react-native-autorecyclerlistview
v1.0.4
Published
AutoRecyclerListView inspired by recyclerListView and react-native-autoscroll-flatlist
Downloads
4
Readme
react-native-autorecyclerlistview
AutoRecyclerListView inspired by recyclerListView and react-native-autoscroll-flatlist
Installation
# Using yarn
yarn add react-native-autorecyclerlistview
# Using npm
npm add react-native-autorecyclerlistview
Demo
Code provided in Example folder.
Usage
Simple usage
...
import AutoRecyclerListView, {ListAutoRenderItem} from 'react-native-autorecyclerlistview'
const Sample = () => {
const [data, setData] = useState<string[]>([])
useEffect(() => {
setInterval(() => {
setData((prev) => [...prev, 'Hello world!'])
}, 1000)
}, [])
const _renderItem: ListAutoRenderItem<string> = ({ item, index }) => {
return (
<View style={{ flex: 1 }}>
<Text children={item} />
</View>
)
}
return (
<View>
<AutoRecyclerListView data={data} renderItem={_renderItem} />
</View>
)
}
Props
Updating...