Looking to set up a global error handler with axios by displaying a prompt, but the prompt component is tied to the Vue instance. In order to achieve this, I have implemented the global error handler like so:
mounted() {
SessionStorage.vueInstance = this;
}
within my App.vue
file and handling errors globally by calling
SessionStorage.vueInstance.$Message.error({...})
Wondering if this approach is acceptable or should it be avoided? Thank you!