DEV Community

Discussion on: "Synchronous" fetch with async/await

Collapse
 
ewirth profile image
Ervin Wirth

Not working...
SyntaxError: await is only valid in async functions and async generators

Collapse
 
totalamd profile image
totalamd • Edited

you need to wrap everything in async func