
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
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 2 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.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.