Open samuelplaymore opened 6 years ago
@samuelplaymore Hey! You are absolutly right, I will update the README to reflect that.
The recomended solution to your issue is to use the renderImage
prop of CachedImage
to render your own image component.
That may be a RN Image
or any other image component such as https://github.com/expo/react-native-responsive-image
@kfiroo why not start using semantic versioning and make a major up for when there's breaking changes like this?
@kytwb True, I thought the minor version bump was enough but a second look proved me wrong :)
Should we publish a new 2.0.0
version for this or wait for the next big change?
0.42.0 here
To fix:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of `CachedImage`.
Next return other warning:
Possible Unhandled Promise Rejection (id: 0):
Cannot read property 'getHostNode' of null
TypeError: Cannot read property 'getHostNode' of null
You can do:
<CachedImage
source={{
uri: this.props.uri,
}}
renderImage={(data) => {
return (<Image {...data}/>);
}}
/>
There is the conflict line:
we use RN 0.45, and we got error of undefined component about ImageBackground.
Please handle it, we suggest choose one way in the following.
Thanks :)