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
It's often useful to be able to run a callback whenever a certain value changes. For example, maybe whenever the user's timezone changes, different parts of the app want to react in different ways to update clocks and other things.
For example:
constkvjs=require('@heyputer/kv.js');// Create a new kv.js instanceconstkv=newkvjs();// Watch the key for changeskv.watch('foo',value=>{console.log('foo changed!',value);});// Set a keykv.set('foo',42);// Console will log 'foo changed! 42'
The text was updated successfully, but these errors were encountered:
It's often useful to be able to run a callback whenever a certain value changes. For example, maybe whenever the user's timezone changes, different parts of the app want to react in different ways to update clocks and other things.
For example:
The text was updated successfully, but these errors were encountered: