DEV Community

Discussion on: useAxios : A simple custom hook for calling APIs using axios

Collapse
 
narven profile image
Pedro Luz

Never understood quite the use of hooks like this. Requests should not be made from inside components, mainly due to separation of concerns and specially in the case that you might need to make the same request from multiple places in you application. So would you use that twice in 2 diferent components?

The only point I see in using this is for a quick prototype to trash the next day.

Personally since I also use redux-sagas, there is usage for me.

But still a good tutorial :)

Some comments have been hidden by the post's author - find out more