Effection: Structured Concurrency for JavaScript

Effection: Structured Concurrency for JavaScript

Structured Concurrency and Effects for JavaScript. Stop worrying about asynchronous bugs and memory leaks. Effection gives you leak-proof, composable operations with the structured concurrency guarantees you didn’t know you needed.

Effection takes a different angle on async JavaScript – instead of bolting cleanup and cancellation onto promises after the fact, it bakes structured concurrency in from the ground up. Every operation automatically cleans up after itself, including all child operations it spawned, so resource leaks become a thing of the past. The API feels familiar too – just regular let, const, try/catch/finally – no exotic abstractions to learn. Dependency-free and under 5KB gzipped, with first-class TypeScript support. The GitHub repo is worth a look.

Also see their post The Hearbreaking Inadequacy of AbortController for a great explianer of the type of problem Effection is solving.

Filed under