Use toast in successful axios request

Viewed 1574

I want to add toast notification after successful axios response. When I create a toast component and register it in vue app.component("ToastAlert", ToastAlert);

How can I acctualy use it in this function?

axios.interceptors.response.use(
  (response) => {
     // want to use the toast notification here
     
     
     return response;
  },
  (error) => {
     // all 4xx/5xx responses will end here
     return Promise.reject(error);
  }
);
1 Answers
Related