Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

⚡ Turbocharge your apps with multithreaded Svelte stores.

NotificationsYou must be signed in to change notification settings

snuffyDev/svelte-worker-store

Repository files navigation

⚡ Turbocharge your app with multithreaded Svelte Stores.

Demo/Documentation Site:https://svelte-worker-store.vercel.app/

What is this?

svelte-worker-store is a small set of Svelte stores that enable you to use Web Workers to process things off the main thread.

Based on another library of mine (nanothreads),svelte-worker-store is a tiny wrapper around an already tiny library.

Features

  • Simple and easy to use 💯
  • Handle resource-heavy workloads without blocking your app! 😎
  • Tiny bundle size:shipit:
  • derived,pooled andchannel stores

Installation

  npm install svelte-worker-store  pnpm install svelte-worker-store

Usage/Examples

Create a 'channel'

<script>// TODO: more examples// Creates a store with a single worker// and limits concurrent calls to 2.conststore=channel(add,2);consthandleClick= ()=>store.send(1,3);</script><p>Output: {$store}</p><buttonon:click={handleClick}>Add numbers</button>

Julia Set

https://svelte-worker-store.vercel.app/demos/julia-set

About

⚡ Turbocharge your apps with multithreaded Svelte stores.

Topics

Resources

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp