You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just found nanostores which has a lot in common with our store implementation.
One improvement is the ability to trigger a callback at the same time as watching...
In nanostores const store.subscribe(cb) passes the current state to cb while const store.listen(cb) just watches.
In our store, this could be achieved in a minor version (backward compatible) with a second boolean argument to watch, although this prevents potentially multiple watchers being passed as an argument, which is an alternative signature.
The text was updated successfully, but these errors were encountered:
I just found nanostores which has a lot in common with our store implementation.
One improvement is the ability to trigger a callback at the same time as watching...
In nanostores
const store.subscribe(cb)
passes the current state tocb
whileconst store.listen(cb)
just watches.In our store, this could be achieved in a minor version (backward compatible) with a second boolean argument to watch, although this prevents potentially multiple watchers being passed as an argument, which is an alternative signature.
The text was updated successfully, but these errors were encountered: