Duplicate images loaded
See original GitHub issueVersion: 0.4.5
Expected Behavior
Images should be unique, no duplicate images should appear
Current Behavior
Currently, my bricks data only contains 2 unique images. I first initialize the bricks data to be an empty array, and then in the componentDidMount, I put 2 elements inside the array
constructor() {
super();
this.state = {
tyu: []
};
}
componentDidMount() {
this.setState({
tyu: [
{
key: Math.floor((Math.random() * 100000000) + 1),
id: 0,
uri: 'https://img.purch.com/w/660/aHR0cDovL3d3dy5saXZlc2NpZW5jZS5jb20vaW1hZ2VzL2kvMDAwLzA5Ny85NTkvb3JpZ2luYWwvc2h1dHRlcnN0b2NrXzYzOTcxNjY1LmpwZw=='
},
{
key: Math.floor((Math.random() * 100000000) + 1),
id: 1,
uri: 'https://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Cat-eating-prey.jpg/220px-Cat-eating-prey.jpg'
},
]
})
}
Possible Solution
Steps to Reproduce
Sample code
<Masonry
sorted={false} // optional - Default: false
columns={2} // optional - Default: 2
bricks={this.state.tyu}
spacing={1}
imageContainerStyle={{
backgroundColor: '#DCDCDC'
}}
/>
Context (Environment)
Detailed Description
Possible Implementation
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Duplicate image loading at Chrome · Issue #3017 - GitHub
Issue because of disabled caching on server with those placeholder images, so once image is preloaded and set as img src, it will...
Read more >Duplicate images while loading the images from android ...
I am getting the duplicate images and the mismatch images(loading wrong image in place of the required image).
Read more >How to Remove Google Photos Duplicates in 2022
The biggest cause of duplicate photos is that the user uploaded them twice. This is often because you didn't realize the picture was...
Read more >Duplicate Images are loading i.e. One Image is displaying twice
I am using WP-Appbox to load my Apple App Store iOS and macOS apps on my website. ... Duplicate Images are loading i.e....
Read more >How To Avoid Duplicate Downloads In Responsive Images
If you load an image using these tags, it will display properly in the appropriate fallback conditions, but it won't otherwise be downloaded ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed on React Native v0.54.
@brh55 Why don’t you test on recent versions? v0.46 looks pretty old.
Just published current state of v0.5.0 as an alpha prerelease (v0.5.0-alpha.1). I haven’t properly tested this, so feel free to test this and report any issues.
An npm install should default to this pre-release.