@signaldb/maverickjs
Version:
This is the [Maverick.js signals](https://github.com/maverick-js/signals) plugin for [SignalDB](https://github.com/maxnowack/signaldb). SignalDB is a local-first JavaScript database with real-time sync, enabling optimistic UI with signal-based reactivity
22 lines (21 loc) • 458 B
JavaScript
import { signal as t, peek as o, getScope as i, onDispose as p } from "@maverick-js/signals";
import { createReactivityAdapter as r } from "@signaldb/core";
const c = r({
create: () => {
const e = t(0);
return {
depend: () => {
e();
},
notify: () => {
e.set(o(() => e() + 1));
}
};
},
isInScope: () => !!i(),
onDispose: (e) => p(e)
});
export {
c as default
};
//# sourceMappingURL=index.mjs.map