MCPcopy Create free account
hub / github.com/dabbott/react-native-express / PhotoGrid

Function PhotoGrid

examples/files/exercises/PhotoGrid.js:6–14  ·  view source on GitHub ↗
({ photos, numColumns, onEndReached })

Source from the content-addressed store, hash-verified

4import { formatPhotoUri } from '../api/picsum'
5
6export default function PhotoGrid({ photos, numColumns, onEndReached }) {
7 const { width } = Dimensions.get('window')
8
9 const size = width / numColumns
10
11 return (
12 <FlatList
13 data={photos}
14 keyExtractor={(item) => item.id}
15 numColumns={numColumns}
16 onEndReached={onEndReached}
17 renderItem={({ item }) => (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected