Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-native-parallax-flatlist
Advanced tools
Parallax effects for images in a React Native FlatList
A drop in replacement for FlatList
that allows for a Parallax effect on images (by using the ParallaxImage component included).
npm install --save react-native-parallax-flatlist
import FlatList, { ParallaxImage } from './react-native-parallax-flatlist';
export default class ParallaxView extends Component {
const data = [
{
title: '(=^ ◡ ^=)',
image: 'http://loremflickr.com/640/480/cat',
},
{
title: 'o(U・ω・)⊃',
image: 'http://loremflickr.com/640/480/dog',
}];
render() {
return (
<FlatList
data={data}
keyExtractor={(item, index) => index}
renderItem={({ item }) => (
<View style={{height: 200}}>
<ParallaxImage
style={[StyleSheet.absoluteFill]}
source={{ uri: item.image }}
parallaxFactor={0.2}
/>
<Text style={{
fontSize: 20,
textAlign: 'center',
lineHeight: 25,
fontWeight: 'bold',
color: 'white',
}}>{item.title}</Text>
</View>
)}
/>
);
}
}
FlatList
PropertiesAny FlatList
property.
ParallaxImage
PropertiesAny Image
property and the following:
Prop | Description | Default |
---|---|---|
parallaxFactor | The speed of the parallax effect. Larger values require taller images or they will be zoomed in. | 0.2 |
Check full example in the Example
folder.
Inspiration taken from react-native-parallax and react-native-snap-carousel
MIT License. © David Sullivan
FAQs
Parallax effects for images in a React Native FlatList
We found that react-native-parallax-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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.