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've been trying to implement an extension like localstored, but with a better approach for onSet + using react-native-async-storage. On every plugin in this repo there's a declaration of State<S, E>. As far as I know, S stands for the type of the value itself, but what about E? What does it mean? How should I use it?
obs> My extension won't be needing other extensions.
The text was updated successfully, but these errors were encountered:
E is a final merge of extension methods and props from all extensions added to the state. Most of the time it is inferred automatically from the attached extension.
Your extension might have E as only {} if you do not need extension methods.
Also have a look at the existing localstored, it allows to pass storage engine, which I believe is async capable.
If you have any questions regarding development of the extension feel free to ask. If you feel your extension is generic enough, you may include it to the hookstate repo
I've been trying to implement an extension like
localstored
, but with a better approach for onSet + using react-native-async-storage. On every plugin in this repo there's a declaration ofState<S, E>
. As far as I know, S stands for the type of the value itself, but what about E? What does it mean? How should I use it?obs> My extension won't be needing other extensions.
The text was updated successfully, but these errors were encountered: