I want to make a redirection in axios interceptors when receiving a 403 error. But how can I access the history outside React components ?
In Navigating Programatically
I am using react-router-dom and it has "history" props which can be used in transition to new route
history.push('/newRoute')