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
This happens, because internally instance.setItem fires a dispatch, which is basically async. The type of it is actually sync which leads to the getting the item directly afterwards being undefined. instance.setItemhere should be changed to return the dispatch promise, so it can get awaited.
The text was updated successfully, but these errors were encountered:
Hey there 👋
Currently there's no way to know, when a item was set to a storage (except for adding a listener, but this doesn't work for a control flow).
This happens, because internally
instance.setItem
fires a dispatch, which is basically async. The type of it is actually sync which leads to the getting the item directly afterwards beingundefined
.instance.setItem
here should be changed to return the dispatch promise, so it can get awaited.The text was updated successfully, but these errors were encountered: