MartinMalinda / vue-concurrency

A library for encapsulating asynchronous operations and managing concurrency for Vue and Composition API.
https://vue-concurrency.netlify.app/
MIT License
352 stars 15 forks source link

Consider using effection #99

Open MartinMalinda opened 10 months ago

MartinMalinda commented 10 months ago

https://github.com/thefrontside/effection

Effection utilizes yield* which seems to be better compatible with TS. Apart from that, it provides concurrency features on its own, which could make this lib more lightweight and get maintenance & updates for free.

vue-concurrency would diverge from ember-concurrency by aligning more towards effection, but embracing a framework agnostic solution as the core and only provide the reactivity seems like the proper way, after all, concurrency management does not have to be vue specific.

Con: I can't seem to find any library that wraps effection to integrate it with any reactivity / rendering system. I was hoping for a ember-effection or react-effection to be somewhere out there.

cowboyd commented 9 months ago

Hi @MartinMalinda 👋

It's awesome that you're considering adopting Effection! In fact, like vue-concurrency, Effection was originally inspired by ember-concurrency. Its goal is to provide the absolute most fundamental primitives for structured concurrency so that it can be used everywhere in JavaScript. You're right there is no "official way" to use Effection with ember or react in the form of an off the shelf package.

However, the good news is that we have done it many times and that it is very straight forward. I'd be happy to work with you on a spike!

MartinMalinda commented 9 months ago

Hi @cowboyd, thanks for reaching out!

Hopefully sometimes soon I'll do some experiments in a new branch and see the pros and cons. I'll reach out if I'm stuck on something!