Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get the updated value inside the call back #23

Open
dbairavan opened this issue Jul 26, 2021 · 1 comment
Open

Can't get the updated value inside the call back #23

dbairavan opened this issue Jul 26, 2021 · 1 comment

Comments

@dbairavan
Copy link

setFilePath(newValue, () => {
console.log(filePath) //Here it's not priting the updated value
getTranslatedText() // In this function also I'm not getting the updated filePath value
})

@coryhouse
Copy link

I suggest:

setFilePath(newValue, () => {
  console.log(newValue) // Just use the newValue here.
  getTranslatedText(newValue) // Pass this function the new value
})

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

No branches or pull requests

2 participants