Dependency injection
yamiteru opened this issue · comments
Yamiteru commented
- Get
// if used inside effect or reactive value it should auto-inject
const currentCount = get(count);
- Set
// automatically triggers listeners if mapped value is not undefined
set(count, 2);
- $
// get facade
const currentCount = $(count);
// set facade
$(count, 2);
- Effect
effect(() => {
console.log($(count));
});
- Computed
const count = $int(0);
const double = $int(0, () = $(count) * 2);