
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
react-native-swiper-flatlist
Advanced tools
yarn add react-native-swiper-flatlist
or
npm install react-native-swiper-flatlist --save
import React, { PureComponent } from 'react';
import { Text, Dimensions, Image, StyleSheet, View } from 'react-native';
import SwiperFlatList from 'react-native-swiper-flatlist';
export default class App extends PureComponent {
render() {
return (
<View style={styles.container}>
<SwiperFlatList
autoplay
autoplayDelay={2}
autoplayLoop
index={2}
showPagination
>
<View style={[styles.child, { backgroundColor: 'tomato' }]}>
<Text style={styles.text}>1</Text>
</View>
<View style={[styles.child, { backgroundColor: 'thistle' }]}>
<Text style={styles.text}>2</Text>
</View>
<View style={[styles.child, { backgroundColor: 'skyblue' }]}>
<Text style={styles.text}>3</Text>
</View>
<View style={[styles.child, { backgroundColor: 'teal' }]}>
<Text style={styles.text}>4</Text>
</View>
</SwiperFlatList>
</View>
);
}
}
export const { width, height } = Dimensions.get('window');
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white'
},
child: {
height: height * 0.5,
width,
justifyContent: 'center'
},
text: {
fontSize: width * 0.5,
textAlign: 'center'
}
});
Prop | Default | Type | Description |
---|---|---|---|
data | not required if children is used | array | Data to use in renderItem |
children | - | node | Children elements |
renderItem | not required if children is used | func | Takes an item from data and renders it into the list |
onMomentumScrollEnd | - | func | Called after scroll end and the first parameter is the current index |
vertical | false | bool | Show vertical swiper |
index | 0 | number | Index to start |
renderAll | false | bool | Render all the items before display it |
Pagination | |||
showPagination | false | bool | Show pagination |
paginationDefaultColor | gray | string | Pagination color |
paginationActiveColor | white | string | Pagination color |
paginationStyle | {} | ViewPropTypes.style | Style object for container |
paginationStyleItem | {} | ViewPropTypes.style | Style object for item (dot) |
PaginationComponent | Component | node | Overwrite Pagination component |
Autoplay | |||
autoplay | false | bool | Change index automatically |
autoplayDelay | 3 | number | Delay between every page |
autoplayLoop | false | bool | Continue playing after reach end |
More props
This is a wrapper around Flatlist, all their props
works well and the inherited props
too (from ScrollView and VirtualizedList)
Name | Params | Use |
---|---|---|
scrollToIndex | (index: number , animated: bool ) | Forces the scroll of the swiper to a precise index |
getCurrentIndex | - | Returns the current index inside the swiper |
Note: Vertical pagination is not supported on Android. Doc
Gustavo Gard
FAQs
React native swiper flatlist component
The npm package react-native-swiper-flatlist receives a total of 12,422 weekly downloads. As such, react-native-swiper-flatlist popularity was classified as popular.
We found that react-native-swiper-flatlist 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.