79480005

Date: 2025-03-03 01:26:54
Score: 2
Natty:
Report link

The hooks are all sharing the same instance of axios. Each mounted hook adds an interceptor, so what you're seeing is expected. The interceptors aren't removed (ejected) until that hook unmounts.

You should likely just move your interceptors out of the hook, especially for something like auth refresh that you'd want on each request anyway. What is the benefit you're looking for by placing them in a hook?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: johnhaup