This is the very early alpha age of this library, and the code is very dirty, but all PRs are welcome.
- stable release version:
- package downloads:
- https://www.npmjs.com/package/react-native-fb-image-grid
npm i react-native-fb-image-grid
.
NOTE: Container that you are putting your FBGrid Width and Height must be calculated, or it will not appear.
import FbGrid from "react-native-fb-image-grid";
<FbGrid
images={[
"https://facebook.github.io/react-native/docs/assets/favicon.png",
"https://facebook.github.io/react-native/docs/assets/favicon.png",
"https://facebook.github.io/react-native/docs/assets/favicon.png",
"https://facebook.github.io/react-native/docs/assets/favicon.png",
"https://facebook.github.io/react-native/docs/assets/favicon.png",
"https://facebook.github.io/react-native/docs/assets/favicon.png"
]}
onPress={onPress}
/>
const onPress = (url, index, event) => {
// url and index of the image you have clicked alongwith onPress event.
}