5 Matching Annotations
- Nov 2020
-
stackoverflow.com stackoverflow.com
- Oct 2020
-
stackoverflow.com stackoverflow.com
-
It looks like you accidentally passed resolve() (immediately invoking the function) directly to setTimeout rather than passing a function to invoke it. So it was being resolved immediately instead of after a 1000 ms delay as intended.
I guess this is the "immediately invoked function" problem.
Not to be confused with: immediately invoked function expression. (Since it is a regular named function and not a function expression.)
-
- Sep 2020
-
www.coreycleary.me www.coreycleary.me
-
here I wrapped the function call in an IIFE - that's what that (async () => {....})() is if you've never seen it. This is simply because we need to wrap the await call in a function that uses the async keyword, and we also want to "immediately invoke" the function (IIFE = "Immediately Invoked Function Execution") in order to call it.
-
-
-
$: (async() => filtered = await getItems())();
-