question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

async/await support in live editor

See original GitHub issue

I’m not sure whether async functions should be working in the LiveEditor or not, but when I have that syntax, I get this error in the LiveError:

“SyntaxError: Unexpected identifier”

I couldn’t find any documentation or issues regarding this.

EDIT:

It appears this works:

async function loop(next) {

But this syntax does not:

async next => {

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ryan-roemercommented, Oct 18, 2022

@tcc-sejohnson we’ve re-tagged react-live@latest to be 3.1.1 (thanks for the tag @gksander !)

0reactions
tcc-sejohnsoncommented, Oct 13, 2022

@ryan-roemer Thanks for the quick response 😃 Yes, that does fix it – yay! Is it just a prerelease version? Any idea when we can expect 3.1.1 to go live?

Read more comments on GitHub >

github_iconTop Results From Across the Web

docusaurus: async await in examples with live editor
throws a runtime error in the live editor CompileError: Transforming async functions is not implemented. Use `transforms: { asyncAwait: ...
Read more >
Async/Await callbacks | Intro.js Docs
Async /Await callbacks. Intro.js main functions to start/stop a tour return a Promise object. You can also return a Promise object in the...
Read more >
[SOLVED] Using async/await inside initialize()
Hi, I'm trying to set up a PlayCanvas project that talks to a Nakama server for realtime multiplayer functionality.
Read more >
Making asynchronous programming easier with async and await
First of all we have the async keyword, which you put in front of a function declaration to turn it into an async...
Read more >
Async/Await in Editor script?
The continuations are accumulated but never get executed, except the moment when the editor starts script recompilation process. In this example ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found