🔗 Function: effect()
effect<
S
>(matcher
):Cleanup
Defined in: node_modules/@zeix/cause-effect/src/effect.ts:23
Define what happens when a reactive state changes
🔗 Type Parameters
🔗 S
S
extends Signal
<{ }>[]
🔗 Parameters
🔗 matcher
effect matcher or callback
EffectMatcher
<S
> | () => void
| Cleanup
🔗 Returns
- cleanup function for the effect
🔗 Since
0.1.0