hookstate
hookstate copied to clipboard
Subscribable Bug: state merge does not invoke sub-path subscription callbacks
const state = hookstate({
a: 0,
b: 0
}, subscribable())
state.a.subscribe(() => console.log('a changed'))
state.a.set(1) // logs `a changed`
state.merge({a: 42}) // does not log `a changed`
this is a major issue 🔴
Ok I will get it fixed. It is possible to fix, it will not be a trivial one.
fix is coming in the next version. Have a look at the fix. I could not think of any better one.