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

Add Futures support to the component event loop #686

Closed
hgzimmerman opened this issue Oct 7, 2019 · 1 comment · Fixed by #717
Closed

Add Futures support to the component event loop #686

hgzimmerman opened this issue Oct 7, 2019 · 1 comment · Fixed by #717

Comments

@hgzimmerman
Copy link
Member

Description

** I'm submitting a feature request - please describe the behavior you want and the motivation.

There exists a fork of Yew called plaster that has support for, among other things, async calls being used in component event loops. With #684, it is possible to imagine people disabling the services feature and interacting with the browser using futures and web_sys.

I suggest that we attempt to port async support back to yew, with credit to @carlosdp of course.

The function at the following link appears to add support for async functions to the event loop: https://github.com/carlosdp/plaster/blob/master/src/html.rs#L135.


I have had trouble integrating web_sys constructs (and I'm assuming wasm_bindgen related things as well) directly into yew, resulting in indecipherable compiler errors when using cargo-web. Hopefully, the addition of this feature is pain-free. Considering that my prior failures to use web_sys might have been due to version mismatches, the work in #681 might make this less painful.


This issue takes inspiration from #636, but offers a more constrained and concrete set of actions to take in order to get part of that proposed featureset implemented.

@ctaggart
Copy link
Contributor

ctaggart commented Oct 7, 2019

it is possible to imagine people disabling the services feature and interacting with the browser using futures and web_sys

That is exactly what I would like to do.

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 a pull request may close this issue.

2 participants