Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-use-infinite-scrolling
Advanced tools
A react native package for infinite scrolling of list
A react native package developed to implement infinite scrolling in any react-native app.
Install via npm
npm i react-native-use-infinite-scrolling
Install via YARN
yarn add react-native-use-infinite-scrolling
Import the InfiniteScroll component from react-native-use-infinite-scrolling:
import InfiniteScroll from 'react-native-use-infinite-scrolling'
This component accepts 4 parameters / props:
import React, {useState} from "react";
import { View, Text } from "react-native";
import {ListItem} from 'native-base';
import axios from 'axios';
import InfiniteScroll from 'react-native-use-infinite-scrolling';
const ExampleInfiniteScroll = () => {
const [incidents, setIncidents] = useState([]);
const [total, setTotal] = useState(0);
const [loading, setLoading] = useState(false);
const [page, setPage] = useState(1);
const perPage = 10;
const url = 'https://api.punkapi.com/v2/beers'; // this is a public api
const renderItem = ({item}) => {
return (
<ListItem>
<Text style={{color: 'red'}}>{item.description}</Text>
</ListItem>
);
};
const loadIncidents = async () => {
try {
setLoading(true);
const response = await axios.get(`${url}?page=${page}&per_page=${perPage}`);
setIncidents([...incidents, ...response.data]);
setPage(page + 1);
} catch (error) {
console.log(error);
} finally {
setLoading(false)
}
}
return (
<View>
<InfiniteScroll
loading={loading}
loadingText="Loading..."
data={incidents}
renderItem={renderItem}
onLoadMore={loadIncidents} />
</View>
);
};
export default ExampleInfiniteScroll;
FAQs
A react native package for infinite scrolling of list
The npm package react-native-use-infinite-scrolling receives a total of 18 weekly downloads. As such, react-native-use-infinite-scrolling popularity was classified as not popular.
We found that react-native-use-infinite-scrolling demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.