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

Support async transformCode, catch transformCode errors #285

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

srmagura
Copy link
Contributor

@srmagura srmagura commented Jan 9, 2022

Hello, I am upgrading the website for the Emotion project to the latest react-live. This PR fixes two issues I encountered with transformCode:

  • transformCode did not support asynchronous functions. We need this because we do our transformation in a web worker to avoid blocking the UI thread.
  • react-live did not handle errors thrown by transformCode. If the user enters invalid code, it is very likely that transformCode will throw. Closes Errors created post-transform aren't caught by react-live #233.
  • Also, the prop type for transformCode was wrong.

@jpdriver jpdriver merged commit 98ba7b2 into FormidableLabs:master Feb 2, 2022
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

Successfully merging this pull request may close these issues.

Errors created post-transform aren't caught by react-live
2 participants