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
Hello! First off, thanks a lot for this useful plugin :). Wanted to bring your attention to a behavior difference in your useLoading implementation vs. other plugins (such as vue-router's useRouter). Your useLoading methods creates a brand new instance, separate from what was globally installed, while other plugins simply call inject to get the global instance (example). That means if I want to use the global instance, with all the configuration options I set, I have to do this instead:
const loading = inject("$loading") as PluginApi;
I'd recommend changing it to just be a wrapper around inject, preventing duplicate instances and avoiding confusing situations such as what I ran into, where global configs strangely didn't have any effect.
The text was updated successfully, but these errors were encountered:
Hello! First off, thanks a lot for this useful plugin :). Wanted to bring your attention to a behavior difference in your
useLoading
implementation vs. other plugins (such as vue-router'suseRouter
). YouruseLoading
methods creates a brand new instance, separate from what was globally installed, while other plugins simply callinject
to get the global instance (example). That means if I want to use the global instance, with all the configuration options I set, I have to do this instead:I'd recommend changing it to just be a wrapper around inject, preventing duplicate instances and avoiding confusing situations such as what I ran into, where global configs strangely didn't have any effect.
The text was updated successfully, but these errors were encountered: