low: proposal api for using local, scoped and shared with value return
betula opened this issue · 1 comments
betula commented
const factory = () => {
const count = value(0);
const inc = count.updater((value, [...args]) => value + 1); // proposal
const dec = count.updater((value) => value - 1);
return () => ({
count: count.get(),
inc, dec
});
}
const Custom = () => {
useScopedValue(factory).inc();
useSharedValue(factory).inc();
useLocalValue(factory).inc();
}
t.to(k.updater((k_v, t_v, prev_t_v) => next_k_v)); // proposal updater using
t.to(k);
t.to.once();
t.to.sync();
betula commented
useScopedValue, useSharedValue, useLocalValue - declined
Other implemented in 0.6.0