hookstate icon indicating copy to clipboard operation
hookstate copied to clipboard

Subscribable Bug: state merge does not invoke sub-path subscription callbacks

Open speigg opened this issue 3 years ago • 2 comments

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`

speigg avatar Sep 06 '22 01:09 speigg

this is a major issue 🔴

nateshmbhat avatar Sep 08 '22 11:09 nateshmbhat

Ok I will get it fixed. It is possible to fix, it will not be a trivial one.

avkonst avatar Sep 09 '22 07:09 avkonst

fix is coming in the next version. Have a look at the fix. I could not think of any better one.

avkonst avatar Dec 18 '22 21:12 avkonst