mirror of
https://github.com/woutdp/live_svelte
synced 2026-05-24 09:28:21 +00:00
* format test config * chore: changed name for store file * updated vite in example project * chore: fix manual install instructions * chore: updated instructions and examples in readme * chore: fix igniter installer * chore: fix igniter installer tests. update guides
7 lines
363 B
TypeScript
7 lines
363 B
TypeScript
import {writable, derived} from "svelte/store"
|
|
|
|
// Shared writable store — a module singleton.
|
|
// Every component that imports this gets the exact same store instance,
|
|
// so any write is immediately visible in all subscribers across the page.
|
|
export const sharedCount = writable(0)
|
|
export const sharedCountIsOdd = derived(sharedCount, count => count % 2 === 1)
|