I have code like this- I am saving my image to state which is getting and printing the right URL
fetchData = async () => {
this.setState({profilePicUrl: await
AsyncStorage.getItem('profileImg')});
//here it is printing the right URL
console.log('this.state.profilePicUrl '+this.state.profilePicUrl);
console.log('this.props.profile '+this.props.profile);
};
However, in the render method of the same component
<Thumbnail source={{uri: this.state.profilePicUrl}} style={{ height: 100, width: null, flex: 1 }} />
this thumbnail is displaying nothing and in EXPO XDE I see source.uri is an empty string
I have logged the profilePicUrl in the render method like this
render() {
console.log('In Render method of Profile');
console.log('In Render method of Profile this.state.profilePicUrl
'+this.state.profilePicUrl);
and able to get the url in console. However, I see this error
source.uri should not be an empty string in the thumbnail
This question is similar to this one as I am also using Firebase for the storing and retrieving the images
Setting image source to Firebase Storage URL with React Native