Skip to content

What is it?

@sheepdog/svelte is a library that aims to solve a problem that every developer will face at one point or another: handling async and concurrent tasks.

@sheepdog/svelte supplies a simple way to introduce cancellable concurrency into your app. Not only do we provide the “cancelability” that is missing from normal Promises, @sheepdog/svelte also provides a public API that allows you to observe the running state of your task without having to set a single flag manually.

Tasks that live on components are automatically canceled when their context is destroyed, meaning you don’t need to worry about the clean up - we’ve got you covered.

Choose whether you want to keep the oldest, keep the newest or keep all instances of your task to help boost the performance of your app and reduce unnecessary server load.

Credits

The work on @sheepdog/svelte is sponsored by Mainmatter