···11# signals
2233-Fast reactive signals.
33+[JSR](https://jsr.io/@mary/signals) | [source code](https://tangled.sh/mary.my.id/pkg-signals)
44+55+fast reactive signals.
4657```ts
68const name = signal(`Mary`);
7988-// Run a side effect that gets rerun on state changes...
1010+// run a side effect that gets rerun on state changes...
911effect(() => {
1012 console.log(`Hello, ${name.value}!`);
1113});
1214// logs `Hello, Mary!`
13151414-// Combine multiple writes into a single update...
1616+// combine multiple writes into a single update...
1517batch(() => {
1618 name.value = `Elly`;
1719 name.value = `Alice!`;
1820});
1921// logs `Hello, Alice!`
20222121-// Run derivations that only gets updated as needed when not depended on...
2323+// run derivations that only gets updated as needed when not depended on...
2224const doubled = computed(() => {
2325 console.log(`Computation ran!`);
2426 return name.repeat(2);