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