-
Notifications
You must be signed in to change notification settings - Fork 9
Description
To Do First
- [x ] Did you try latest release?
- [ x] Did you look for existing matching issues?
Software Package Version:
expo 37, android
Describe the bug
When you add images after a remote request, the images show in the masoned layout, however if you click one of the images you get TypeError: undefined is not an object (evaluating 'data[0]
...javascript
export default class ExploreScreen extends Component {
state = {
postImages: []
}
componentWillMount(){
this.addMoreImages();
}
addMoreImages = () => { // request to firebase for posts
this.setState({postImages})
}
render() {
return (
<ImageLayout
columns={3}
enableModal
spacing={0.05}
images={this.state.postImages}
onEndReached={this.addMoreImages}
/>
);
}
}
...
My objects being passed to the ImageLayout look exactly the same as the one in the example.
{uri, height, width}
The images itself load only the image modal viewer is the problem
Also to note: New images loaded even using the example, will result in Image Viewer not loading the correct image, it will only keep track of the first image array that was passed to it.
I even tried wrapping the ImageLayout in a functional component so it refreshes but it didn't seem to work
Thanks