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 LiveViewComponentManager methods #31

Closed
juanpprieto opened this issue Feb 14, 2022 · 3 comments
Closed

Support async LiveViewComponentManager methods #31

juanpprieto opened this issue Feb 14, 2022 · 3 comments

Comments

@juanpprieto
Copy link

juanpprieto commented Feb 14, 2022

Hey Donnie,

First of all, thanks for putting this together. Love it.

While playing around with the examples (and inspecting the code for the Todo MVC demo), I noticed there are no examples which fetch data externally via async/fetch operations. What's the recommended/planned way of doing so?

I feel as if mount, render, handleEvent and handleInfo should all optionally support async signatures, so that one can actually fetch/push data from/to external sources/apis.

I'm new to Liveview (thanks for referencing the pragmatic series), so still trying to wrap my head around some of the more advanced concepts.

Once again, thanks for bringing this to node.

@floodfx
Copy link
Owner

floodfx commented Feb 14, 2022

Hey @juanpprieto! Thanks for checking it out and the kind words!

Really great point on the async support. I will see what I can do over the next couple of days to add support for that. Thanks for bringing it up and adding an issue. If you get to it before I do, I am happy to review a PR.

@floodfx
Copy link
Owner

floodfx commented Feb 15, 2022

@juanpprieto check out version 0.0.5. Added an example under src/examples/asyncfetch. LMK what you think.

@juanpprieto
Copy link
Author

@floodfx Looks great! — will play around with it and keep you posted.

Thanks for the quick turnaround!

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

No branches or pull requests

2 participants