AutoRecyclerListView inspired by recyclerListView and react-native-autoscroll-flatlist
yarn add react-native-autorecyclerlistview
npm i react-native-autorecyclerlistview
Code provided in example folder.
...
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>
<Text children={item} />
</View>
)
}
return (
<View style={{ flex: 1 }}>
<AutoRecyclerListView data={data} renderItem={_renderItem} />
</View>
)
}
...
Updating...