- - - - Effection - - Structured Concurrency and Effects for JavaScript - - - - Get Started - - - API Reference - - - - December 18, 2023 - We're proud to{" "} - - announce the release of Effection 3.0. - - - - - - - - - - - Latest video - - - Watch Charles Lowell, the creator of Effection, explain - Effection and answer frequenty asked questions. - - - - - - - - - - Stop worrying about asynchrony - - - Effection gives you control over asyncronous operations with - {" "} - - Structured Concurrency guarantees - - . We ensure that all asyncronous operations are well behaved - so you can focus on using async instead of managing it. - - - - - Effection code cleans up after itself, and that means never - having to remember to manually close a resource or detach a - listener. - - - - An Effection operation can be shut down at any moment which - will not only stop it completely but also stop any other - operations that it started. - - - - Unlike Promises and async/await, Effection is fundamentally - synchronous in nature, which means you have full control - over the event loop and operations requiring synchronous - setup remain race condition free. - - - - Since all Effection code is well behaved, it clicks together - easily, and there are no nasty surprises when fitting - different pieces together. - - - - - - - - It's just JavaScript - - - Effection is a light-weight alternative to{" "} - async/await{" "} - with Structured Concurrency guarantees. It only requires - adding a few new JavaScript techniques to the knowledge you - already have. - - - - - <> - Use let, const,{" "} - for, while,{" "} - switch/case and{" "} - try/catch/finally{" "} - to write asyncrous operations. They work as you'd expect. - > - - } - summary="First-class TypeScript Support" - > - <> - Use in TypeScript or JavaScript projects without modifying - your build setup. Effection operations can be used and - distributed in pure ESM code. - > - - - <> - Small API focused excusively on what you need to gain - Structured Concurrency guarantees in JavaScript and - nothing else. - > - - } - summary="Async/Await/Promise alternatives" - iconSize="h-14 w-14" - > - <> - For every Async/Await/Promise API we provide Structured - Concurrency compliant Effection alternative. Checkout our - {" "} - - Async Rosetta Stone - {" "} - for translations. - > - - - <> - Everything you need comes in one dependency-free package. - At less than 5KB minified and gzipped, Effection can be - dropped into any project. - > - - - <> - Use in TypeScript or JavaScript projects without modifying - your build setup. Effection operations can be used and - distributed in pure ESM code. - > - - - -