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 would be nice if we could name events to be used with the useMMKVListner, so that when we do something like this storage.set('user', JSON.stringify(user)), we could also pass a third parameter as the event name.
This is nice bacause it'd be easier to filter events on the listener hook, like a switch or ifs. In some cases, you don't want the function inside the hook to be called at every change in the storage, so you need some sort of varification for calling the function only when wanted; named events could ease that a lot.
The text was updated successfully, but these errors were encountered:
New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time.
To support @mrousavy, please consider 💖 sponsoring him on GitHub 💖.
Sponsored issues will be prioritized.
It would be nice if we could name events to be used with the
useMMKVListner
, so that when we do something like thisstorage.set('user', JSON.stringify(user))
, we could also pass a third parameter as the event name.This is nice bacause it'd be easier to filter events on the listener hook, like a
switch
orifs
. In some cases, you don't want the function inside the hook to be called at every change in the storage, so you need some sort of varification for calling the function only when wanted; named events could ease that a lot.The text was updated successfully, but these errors were encountered: