react-native-thumbnail icon indicating copy to clipboard operation
react-native-thumbnail copied to clipboard

any way to assign the return file path to variable?

Open jothikannan opened this issue 6 years ago • 1 comments

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

jothikannan avatar Jan 02 '19 14:01 jothikannan

try with await/async syntax

SimonErm avatar Jan 29 '19 13:01 SimonErm