fast reactive signals jsr.io/@mary/signals
typescript jsr
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: update links in readme

Mary cd8c3cdc fe253a2c

+6 -4
+6 -4
README.md
··· 1 1 # signals 2 2 3 - Fast reactive signals. 3 + [JSR](https://jsr.io/@mary/signals) | [source code](https://tangled.sh/mary.my.id/pkg-signals) 4 + 5 + fast reactive signals. 4 6 5 7 ```ts 6 8 const name = signal(`Mary`); 7 9 8 - // Run a side effect that gets rerun on state changes... 10 + // run a side effect that gets rerun on state changes... 9 11 effect(() => { 10 12 console.log(`Hello, ${name.value}!`); 11 13 }); 12 14 // logs `Hello, Mary!` 13 15 14 - // Combine multiple writes into a single update... 16 + // combine multiple writes into a single update... 15 17 batch(() => { 16 18 name.value = `Elly`; 17 19 name.value = `Alice!`; 18 20 }); 19 21 // logs `Hello, Alice!` 20 22 21 - // Run derivations that only gets updated as needed when not depended on... 23 + // run derivations that only gets updated as needed when not depended on... 22 24 const doubled = computed(() => { 23 25 console.log(`Computation ran!`); 24 26 return name.repeat(2);