Async example doesn't work
See original GitHub issuewithScriptjs(
withGoogleMap(
fils with error TypeError: (0 , _withScriptjs.withScriptjs) is not a function
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Why `async/await` doesn't work in my case? - Stack Overflow
await only suspends when the value passed to it is a Promise . In your case, setTimeout returns a Number so await doesn't...
Read more >Async/await - The Modern JavaScript Tutorial
// works only inside async functions let value = await promise;. The keyword await makes JavaScript wait until that promise settles and returns ......
Read more >async function - JavaScript - MDN Web Docs - Mozilla
An async function will return a different reference, whereas Promise.resolve returns the same reference if the given value is a promise.
Read more >javascript - await does not wait for Promise to finish
So it's a bit weird. The "waiting" happens within that aync function, not your initial js function. consider this example
Read more >Do not use forEach with async-await - gists · GitHub
Array.prototype.forEach is not designed for asynchronous code. (It was not suitable for promises, and it is not suitable for async-await.).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you possibly miss the
@beta
tag when you npm installed?I get those files if I do a straight
npm install react-google-maps
, but if Inpm install react-google-maps@beta
I get the expected withScriptjs files.Please refer to Getting Help section in the README (or #469).