angelle-sw / use-axios-client

Make axios requests in React using hooks.
https://use-axios-client.io
MIT License
157 stars 7 forks source link

Global configuration? #105

Open therealparmesh opened 4 years ago

therealparmesh commented 4 years ago

Maybe a consumer doesn't want to install axios, but wants the API so they install an API-compliant replacement like redaxios. They may not want to pass in a custom "Axios" instance every time they use the hook. Should there be a way to globally configure use-axios to use a certain "Axios" instance? Or should consumers just wrap and re-export use-axios in their project code?

zxqx commented 4 years ago

Really interesting idea - will open an issue for this.

zxqx commented 4 years ago

Oh wait, this is an issue lol. Let's take a stab at this soon. Any ideas for what this might look like API-wise?