@tanstack/store
Version:
Framework agnostic type-safe store w/ reactive framework adapters
25 lines (24 loc) • 406 B
JavaScript
import { Derived } from "./derived.js";
class Effect {
constructor(opts) {
const { eager, fn, ...derivedProps } = opts;
this._derived = new Derived({
...derivedProps,
fn: () => {
},
onUpdate() {
fn();
}
});
if (eager) {
fn();
}
}
mount() {
return this._derived.mount();
}
}
export {
Effect
};
//# sourceMappingURL=effect.js.map