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

Use callbacks to implement async return #1

Merged
merged 1 commit into from Jul 4, 2018

Conversation

FWeinb
Copy link
Contributor

@FWeinb FWeinb commented Jul 4, 2018

There is as solution to "return" things from wasm but as you said in the video because everything is async the only way to do it is to use a callback as a second parameter. This PR exposes the function blackfridayFormat(input, cb) where input is a string and cb is a function that takes the resulting string as the first parameter.

@yamalight
Copy link
Contributor

Very cool! Thanks for highlighting this 👍

@yamalight yamalight merged commit 485c8e5 into BuildingXwithJS:master Jul 4, 2018
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.

None yet

2 participants