Closed kkotkkio closed 6 years ago
I read README.md .
And I wrote below.
import React, { Component } from 'react'; import { View, Text, Image, StyleSheet } from 'react-native'; import Masonry from 'react-native-masonry'; import FastImage from 'react-native-fast-image'; const data = [ { uri: 'https://unsplash.it/400/400?image=1', priority: FastImage.priority.normal, style: { width: 300, height: 300 } } ]; const fastProps = { onProgress: e => { console.log(e.nativeEvent.loaded / e.nativeEvent.total) }, resizeMode: FastImage.resizeMode.contain }; class HomeScreen extends Component { constructor(props) { super(props); } render() { return ( <View> <FastImage style={s.image} source={{ uri: 'https://unsplash.it/400/400?image=1', headers:{ Authorization: 'someAuthToken' }, priority: FastImage.priority.normal, }} resizeMode={FastImage.resizeMode.contain} /> <<<<<<<<<<<<<<<<<<< **_this is well._** <Masonry bricks={data} customImageComponent={FastImage} customImageProps={fastProps} /> **_<<<<<<<<<< this is not showing on screen_** </View> ); } } export default HomeScreen; const s = StyleSheet.create({ image: { width: 300, height: 300 } });
First, I try to use FastImage single like below. <FastImage> This work well.
<FastImage>
But I try to use FastImage with Masonry (customImageComponent) , this is not showing.
I'd like to know detail how to use customImageComponent.
Needs help.
Thank you :)
I think of this problem was didn't styling so how to apply some 'style' in customImageComponent?
@kkotkkio I would suggest following the example, the example is using FastImage ^_^
I read README.md .
And I wrote below.
First, I try to use FastImage single like below.
<FastImage>
This work well.But I try to use FastImage with Masonry (customImageComponent) , this is not showing.
I'd like to know detail how to use customImageComponent.
Needs help.
Thank you :)