Installations
npm install react-native-images-loaded
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
10.20.1
NPM Version
6.14.4
Score
21.5
Supply Chain
48.7
Quality
62.7
Maintenance
25
Vulnerability
93.8
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
mistenkt
Download Statistics
Total Downloads
721
Last Day
1
Last Week
2
Last Month
22
Last Year
92
GitHub Statistics
1 Stars
5 Commits
1 Forks
2 Watchers
17 Branches
1 Contributors
Updated on Jan 27, 2021
Package Meta Information
Latest Version
1.0.2
Package Id
react-native-images-loaded@1.0.2
Unpacked Size
6.50 kB
Size
2.50 kB
File Count
8
NPM Version
6.14.4
Node Version
10.20.1
Total Downloads
Cumulative downloads
Total Downloads
721
Last Day
0%
1
Compared to previous day
Last Week
-75%
2
Compared to previous week
Last Month
214.3%
22
Compared to previous month
Last Year
-8%
92
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
react-native-images-loaded
An imagesloaded wrapper with callback for react-native
Why?
I needed a clean way to wait for all child Image components to prefetch before fading in the parent component. I could manually prefetch all images in the parent component, but id rather have something that dynamically registers all images inside the context and waits for them to be loaded before triggering the callback provided to the context.
Installation
yarn add react-native-images-loaded
Usage Example
Simple example, you would probably use an animated value and fade in the wrapper once the images are loaded. Works for images in any depth.
1import React, {useState} from 'react'; 2import {View, StyleSheet} from 'react-native'; 3import { 4 ImagesLoadedWrapper, 5 Image 6} from 'react-native-images-loaded'; 7 8const styles = StyleSheet.create({ 9 hidden: { 10 opacity: 0, 11 overflow: 'hidden' 12 }, 13 image: { 14 width: 500, 15 height: 500 16 } 17}); 18 19const Foo = () => { 20 const [imagesLoaded, setImagesLoaded] = useState(false); 21 22 return ( 23 <ImagesLoadedWrapper 24 onImagesLoaded={() => setImagesLoaded(true)} 25 > 26 <View style={!imagesLoaded && styles.hidden}> 27 <Image 28 source={{uri: 'https://placekitten.com/500/500'}} 29 style={styles.image} 30 /> 31 32 <Image 33 source={{uri: 'https://placekitten.com/600/600'}} 34 style={styles.image} 35 /> 36 {/* 37 <ComponentWithMoreImages/> 38 <ComponentWithComponentsThatHasImages/> 39 */} 40 </View> 41 </ImagesLoadedWrapper> 42 ); 43 44}; 45 46export default Foo;
Notes
- If no
ImagesLoadedWrapper
is found then images work as normally. - The
Image
component extends the default RN Image component and passes on any props.
Todo
- Finish up writing the tests
- Probably support simple fadein animation out of the box, but for now you have to handle it manually.

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
54 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-f5x2-xv93-4p23
- Warn: Project is vulnerable to: GHSA-gmpm-xp43-f7g6
- Warn: Project is vulnerable to: GHSA-pf27-929j-9pmm
- Warn: Project is vulnerable to: GHSA-327c-qx3v-h673
- Warn: Project is vulnerable to: GHSA-x4cf-6jr3-3qvp
- Warn: Project is vulnerable to: GHSA-mph8-6787-r8hw
- Warn: Project is vulnerable to: GHSA-7mhc-prgv-r3q4
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-4cpg-3vgw-4877
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-rxrc-rgv4-jpvx
- Warn: Project is vulnerable to: GHSA-7f53-fmmv-mfjv
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-gff7-g5r8-mg8m
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-662x-fhqg-9p8v
- Warn: Project is vulnerable to: GHSA-394c-5j6w-4xmx
- Warn: Project is vulnerable to: GHSA-78cj-fxph-m83p
- Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv
- Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q
- Warn: Project is vulnerable to: GHSA-crh6-fp67-6883
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
Score
1.3
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More