
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-fetch-list
Advanced tools
This component will manage data loading, rereshing and loading more with a fetch prop which returns a promise. You don't need to do these by youself. Rendering with Flatlist.
This component will manage data loading, rereshing and loading more with a fetch prop which returns a promise. You don't need to do these by youself. Rendering with Flatlist.
Other props will be spread onto FlatList
| Name | Type | description |
|---|---|---|
| fetch | (params: { page: number; limit: number }) => Promise<T[]> | how to get data |
| limit | number, optional | data limit per page, default 10 |
| data | T[], optional | if you want to manage the data by yourself, use this prop |
| onChange | (data: T[]) => void, optional | be triggered when data change |
| filter | (item: T) => boolean, optional | method to filter some data |
import React, { useRef, useEffect } from 'react';
import { StyleSheet, View, Text } from 'react-native';
import ListView from 'react-native-fetch-list';
const App = () => {
const keyExtractor = item => item.id;
const request = ({ page, limit }) => {
return fetch(
`https://cnodejs.org/api/v1/topics?page=${page}&limit=${limit}`,
)
.then(res => res.json())
.then(data => data.data);
};
const list = useRef();
useEffect(() => {
list.current.fetch();
}, []);
const renderItem = ({ item }) => (
<View style={styles.item}>
<Text>{item.title}</Text>
</View>
);
return (
<ListView
ref={list}
fetch={request}
keyExtractor={keyExtractor}
renderItem={renderItem}
ListEmptyComponent={<Text>no data</Text>}
/>
);
};
const styles = StyleSheet.create({
item: {
paddingVertical: 10,
paddingHorizontal: 15,
borderBottomWidth: StyleSheet.hairlineWidth,
borderBottomColor: '#999',
},
});
export default App;
FAQs
This component will manage data loading, rereshing and loading more with a fetch prop which returns a promise. You don't need to do these by youself. Rendering with Flatlist.
The npm package react-native-fetch-list receives a total of 0 weekly downloads. As such, react-native-fetch-list popularity was classified as not popular.
We found that react-native-fetch-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.