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
What do you think about adding the ability to add and remove hooks on an already created instance? I know it's possible to modify an instance with extend, but in this case a new instance is created and the hook on the original instance are not modified.
The use case I have in mind is the possibility of adding a hook from a useEffect in a React application that can be removed when the useEffect is cleaned up. This may be necessary if a JWT token is stored in a React context, for example.
Your question seems based on the premise that the original instance still existing is a problem. But why is it a problem? Once you've created your new instance, you can just stop using the original one and it will be garbage collected.
Hi everyone,
What do you think about adding the ability to add and remove hooks on an already created instance? I know it's possible to modify an instance with extend, but in this case a new instance is created and the hook on the original instance are not modified.
The use case I have in mind is the possibility of adding a hook from a useEffect in a React application that can be removed when the useEffect is cleaned up. This may be necessary if a JWT token is stored in a React context, for example.
On axios there is two functions for add/remove
Maybe I'm going in the wrong direction and this isn't the right method for this use case?
The text was updated successfully, but these errors were encountered: