@loom-mvvm/core
v0.1.0
Published
Framework-independent reactive and ViewModel runtime for Loom
Maintainers
Readme
@loom-mvvm/core
Framework-independent reactive and ViewModel runtime for Loom.
Install
npm install @loom-mvvm/coreUsage
import { action, computed, defineViewModel, state } from "@loom-mvvm/core";
export const CounterViewModel = defineViewModel(() => {
const count = state(0);
const doubled = computed(() => count.get() * 2);
const increment = action(() => count.set(count.get() + 1));
return { count, doubled, increment, dispose: () => count.dispose() };
});Status
Experimental — APIs may change.
