TuNguyenThanh / react-native-image-placeholder

React native Image Placeholder
141 stars 53 forks source link

Check the render method of ImageLoad #11

Closed kwoumn3 closed 6 years ago

kwoumn3 commented 7 years ago

I did an npm install of the latest react-native-image-placeholder and when I am running my code in the iOS simulator through Xcode, I get the following error:

screen shot 2017-08-03 at 8 18 34 am

Is this something I am doing wrong or is there something wrong with the library?

kenhkelly commented 7 years ago

Hi @kwoumn3, If you can, please share your code so we could have a better idea of what's going on.

kwoumn3 commented 7 years ago

@kenhkelly This is how I'm using this library

{files.length === 1 &&
          <TouchableWithoutFeedback onPress={onPress} disabled={!imageTouchable}>
            <View style={[styles.cardMediaImages, style, { flexDirection: 'row' }]}>
              <ImageLoad
                source={{ uri: `${files[0]}` }}
                style={{ flex: 1 }}
              />
            </View>
          </TouchableWithoutFeedback>
        }
kwoumn3 commented 7 years ago

I think this issue could be related to ImageBackground being imported from react-native. It doesn't look like there is such a component in react-native by that name

jlcrow commented 7 years ago

Latest version of react-native 46.x

kwoumn3 commented 7 years ago

@jlcrow Hmm that would make sense why I am getting this error then because I am on version 0.44.0. Could you possibly point me to documentation for ImageBackground. I've looked at 0.46.x docs and didn't seem to find anything (http://facebook.github.io/react-native/releases/0.46/docs/getting-started.html)

jlcrow commented 7 years ago

Funny thing is there doesn't seem to be anything in the docs, we just started getting warnings in the simulator saying not to use children in image tags, instead use ImageBackground.