I\'m building a simple app in React Native that fetches listings from a remote JSON source and displays them on screen.
So far, using the excellent example here, I\
Check the following example using FlatList component of React Native to support infinite scrolling with an excellent performance:
//Resize the grid
onLayout = (event) => {
const {width} = event.nativeEvent.layout;
const itemWidth = 150
const numColumns = Math.floor(width/itemWidth)
this.setState({ numColumns: numColumns })
}
render() {
return (
index}
key={this.state.numColumns}
numColumns={this.state.numColumns}
renderItem={({item}) =>
}
/>
)
}
The example looks like
Best regards, Nicholls