How to set global default headers in Axios in dependencies that use Axios too?
I'm making a "react component" (public in npm) that depends on Axios but when that component makes an Ajax call, I need that component to keep the Axios config headers of my (parent) project.
*It looks like my "react-component" makes a new instance of Axios instead of using the Axios instance of my (parent) project.
axios.defaults.headers['authKey']='xxxxxx'
*I already use the Axios interceptors in my (parent) project but the Ajax made for my "react component" is never triggered.