Using Axios with React Hooks | Tigran in Tech

preview_player
Показать описание
Axios has a library for using HTTP Requests integrated with React Hooks. That library called axios-hooks, which is very similar as Apollo React library has for GraphQL Requests.
This video is for basic implementation and usage for Axios Hooks to make a simple JSON HTTP requests for a plain Create React App component without major changes.

-----
Рекомендации по теме
Комментарии
Автор

This was very helpful! Thanks very much!

meyw
Автор

why in the console there are basic logs twice and also data twice?

koubinhanz
Автор

I don't get why we are checking for 'data && data.ad && data.ad.company' instead of just checking for 'data.ad.company' which we need. Anyway to check this JS tries to get 'data' first and so on.
Am I right?

Also, did I get right that axios is just a neat way of handling fetching, response, loading and errors?

varserzakaryan
Автор

The problem is, how can I send POST request or any request which based on event ?

yokiijay
Автор

How do you deal with CORS with this library?

pixel
Автор

Nice tutorial. Can u make one with axios post authentication?

platek