Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

any way to assign the return file path to variable? #38

Open
jothikannan opened this issue Jan 2, 2019 · 1 comment
Open

any way to assign the return file path to variable? #38

jothikannan opened this issue Jan 2, 2019 · 1 comment

Comments

@jothikannan
Copy link

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

@SimonErm
Copy link

try with await/async syntax

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants