
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
react-native-image-grid
Advanced tools
React Native component that handles the complexities of building a grid of photos with a flexible number of photos per row.
React Native component that handles the complexities of building a grid of photos with a flexible number of photos per row
npm install react-native-image-grid --save
import React from 'react-native';
import PhotoGrid from 'react-native-image-grid';
let { Image, TouchableOpacity, Text } = React;
class BestGrid extends React.Component {
constructor() {
super();
this.state = { items: [] };
}
componentDidMount() {
// Build an array of 60 photos
let items = Array.apply(null, Array(60)).map((v, i) => {
return { id: i, src: 'http://placehold.it/200x200?text='+(i+1) }
});
this.setState({ items });
}
render() {
return(
<PhotoGrid
data = { this.state.items }
itemsPerRow = { 3 }
itemMargin = { 1 }
itemPaddingHorizontal={1}
renderHeader = { this.renderHeader }
renderItem = { this.renderItem }
/>
);
}
renderHeader() {
return(
<Text>I'm on top!</Text>
);
}
renderItem(item, itemSize, itemPaddingHorizontal) {
return(
<TouchableOpacity
key = { item.id }
style = {{ width: itemSize, height: itemSize, paddingHorizontal: itemPaddingHorizontal }}
onPress = { () => {
// Do Something
}}>
<Image
resizeMode = "cover"
style = {{ flex: 1 }}
source = {{ uri: item.src }}
/>
</TouchableOpacity>
)
}
}
export default BestGrid;
This repository is a fork of react-native-photo-grid
with improvements
FAQs
React Native component that handles the complexities of building a grid of photos with a flexible number of photos per row.
The npm package react-native-image-grid receives a total of 25 weekly downloads. As such, react-native-image-grid popularity was classified as not popular.
We found that react-native-image-grid 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
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.