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
Usually, there are some hooks that are to be called only once.
In the current API, it is delegated to hook consumers to use hookOnce on them; if they don't and use hook insteam, small callbacks might remain in memory.
A new .callHookOnce API can make sure it from provider-side and automatically discard all listeners after.
Second idea: We could also warn if a hook register attempt after callOnce that it won't be called and likely a late register issue
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Describe the feature
Usually, there are some hooks that are to be called only once.
In the current API, it is delegated to hook consumers to use
hookOnce
on them; if they don't and usehook
insteam, small callbacks might remain in memory.A new
.callHookOnce
API can make sure it from provider-side and automatically discard all listeners after.Second idea: We could also warn if a hook register attempt after callOnce that it won't be called and likely a late register issue
Additional information
The text was updated successfully, but these errors were encountered: