react-native-thumbnail
react-native-thumbnail copied to clipboard
any way to assign the return file path to variable?
getThumbnail(filePath){
let thumbnailURL;
RNThumbnail.get(filePath).then((response) => response.path)
.then((responseData) => {
console.warn(responseData);
return responseData;
})
.catch(error => console.warn(error));
alert(thumbnailURL);
//return thumbnailURL;
}
I am trying to get thumbnail path and storing to a variable to be used, But I am getting undefined
try with await/async syntax