Use Axios with React Hooks for Async-Await Requests
Offered By: Dave Gray via YouTube
Course Description
Overview
Learn how to create custom React hooks with Axios for handling asynchronous requests in this comprehensive tutorial. Explore the process of building two custom hooks, useAxios and useAxiosFunction, to efficiently manage CRUD operations. Discover how to implement an Axios instance, work with request configurations, and utilize the AbortController for improved performance. Follow along as the instructor demonstrates practical applications through the creation of Joke and Posts components. Gain insights into testing the custom hooks, adding refetch functionality, and debugging common issues. By the end of this tutorial, master the integration of Axios with React hooks for seamless async/await requests in your web applications.
Syllabus
Intro
Welcome
Install Axios
useAxios hook
Request Config
useAxios continued
AbortController - not isMounted
useAxios completed
Create an Axios instance
Joke component
Testing useAxios
Add refetch to useAxios
Testing refetch
useAxios vs useAxiosFunction
useAxiosFunction
Create a 2nd Axios instance
Posts component
Quick debug
Testing useAxiosFunction
Taught by
Dave Gray
Related Courses
Introduction to ReactJSMicrosoft via edX Front-End Web Development with React
The Hong Kong University of Science and Technology via Coursera Multiplatform Mobile App Development with React Native
The Hong Kong University of Science and Technology via Coursera Client-based Web Applications development: ReactJS & Angular
Universidad Politécnica de Madrid via MirÃadax React
Udacity