1- import React from "react" ;
2- import { StatusBar , FlatList , Dimensions } from "react-native" ;
3- import ProgressiveImage from "@freakycoder/react-native-progressive-fast-image" ;
4- const { width : ScreenWidth } = Dimensions . get ( "window" ) ;
1+ import React from 'react' ;
2+ import { StatusBar , FlatList , Dimensions } from 'react-native' ;
3+ // import ProgressiveImage from "@freakycoder/react-native-progressive-fast-image";
4+ import ProgressiveImage from './build/dist/ProgressiveFastImage' ;
5+ const { width : ScreenWidth } = Dimensions . get ( 'window' ) ;
56console . disableYellowBox = true ;
67
78const images = [
89 {
9- uri :
10- "https://images.unsplash.com/photo-1544627836-e63eb27c6e09?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjQzMzEwfQ&auto=format&fit=crop&w=2100&q=80" ,
10+ uri : 'https://images.unsplash.com/photo-1544627836-e63eb27c6e09?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjQzMzEwfQ&auto=format&fit=crop&w=2100&q=80' ,
1111 } ,
1212 {
13- uri :
14- "https://images.unsplash.com/photo-1544621660-1a179ba542a9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
13+ uri : 'https://images.unsplash.com/photo-1544621660-1a179ba542a9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
1514 } ,
1615 {
17- uri :
18- "https://images.unsplash.com/photo-1544945582-3b466d874eac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2389&q=80" ,
16+ uri : 'https://images.unsplash.com/photo-1544945582-3b466d874eac?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2389&q=80' ,
1917 } ,
2018 {
21- uri :
22- "https://images.unsplash.com/photo-1544979407-1204ff29f490?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
19+ uri : 'https://images.unsplash.com/photo-1544979407-1204ff29f490?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
2320 } ,
2421 {
25- uri :
26- "https://images.unsplash.com/photo-1544807459-eb0ae8cda3e0?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80" ,
22+ uri : 'https://images.unsplash.com/photo-1544807459-eb0ae8cda3e0?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2110&q=80' ,
2723 } ,
2824 {
29- uri :
30- "https://images.unsplash.com/photo-1544954617-f5c6b0d16164?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2064&q=80" ,
25+ uri : 'https://images.unsplash.com/photo-1544954617-f5c6b0d16164?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2064&q=80' ,
3126 } ,
3227 {
33- uri :
34- "https://images.unsplash.com/photo-1544914118-b7a55a9ecca6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
28+ uri : 'https://images.unsplash.com/photo-1544914118-b7a55a9ecca6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
3529 } ,
3630 {
37- uri :
38- "https://images.unsplash.com/photo-1544913776-90c1223073a3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2102&q=80" ,
31+ uri : 'https://images.unsplash.com/photo-1544913776-90c1223073a3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2102&q=80' ,
3932 } ,
4033 {
41- uri :
42- "https://images.unsplash.com/photo-1545128309-686a71a99f76?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
34+ uri : 'https://images.unsplash.com/photo-1545128309-686a71a99f76?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
4335 } ,
4436 {
45- uri :
46- "https://images.unsplash.com/photo-1545140976-8c17471ba12d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2340&q=80" ,
37+ uri : 'https://images.unsplash.com/photo-1545140976-8c17471ba12d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2340&q=80' ,
4738 } ,
4839 {
49- uri :
50- "https://images.unsplash.com/photo-1545105511-839f4a45a030?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
40+ uri : 'https://images.unsplash.com/photo-1545105511-839f4a45a030?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
5141 } ,
5242 {
53- uri :
54- "https://images.unsplash.com/photo-1545079968-1feb95494244?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1867&q=80" ,
43+ uri : 'https://images.unsplash.com/photo-1545079968-1feb95494244?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1867&q=80' ,
5544 } ,
5645 {
57- uri :
58- "https://images.unsplash.com/photo-1545128337-6c5cf2684520?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
46+ uri : 'https://images.unsplash.com/photo-1545128337-6c5cf2684520?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
5947 } ,
6048 {
61- uri :
62- "https://images.unsplash.com/photo-1544933411-f64b01485fd3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2102&q=80" ,
49+ uri : 'https://images.unsplash.com/photo-1544933411-f64b01485fd3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2102&q=80' ,
6350 } ,
6451 {
65- uri :
66- "https://images.unsplash.com/photo-1544177817-454e1238e05f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80" ,
52+ uri : 'https://images.unsplash.com/photo-1544177817-454e1238e05f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2100&q=80' ,
6753 } ,
6854 {
69- uri :
70- "https://images.unsplash.com/photo-1544946632-b73cacef16ad?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2389&q=80" ,
55+ uri : 'https://images.unsplash.com/photo-1544946632-b73cacef16ad?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2389&q=80' ,
7156 } ,
7257] ;
7358
7459const App = ( ) => {
7560 const renderItem = ( data : any ) => {
76- const { item, index } = data ;
61+ const { item, index} = data ;
7762
7863 return (
7964 < ProgressiveImage
@@ -87,10 +72,10 @@ const App = () => {
8772 loadingImageStyle = { {
8873 width : 50 ,
8974 height : 50 ,
90- alignSelf : " center" ,
75+ alignSelf : ' center' ,
9176 } }
9277 imageAnimationDuration = { 10000 }
93- loadingSource = { require ( " ./assets/loading3.gif" ) }
78+ loadingSource = { require ( ' ./assets/loading3.gif' ) }
9479 />
9580 ) ;
9681 } ;
0 commit comments