Learn AI, Data Science & Business — Earn Certificates That Get You Hired
Learn Backend Development Part-Time, Online
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial demonstrates how to create and apply reusable React custom hooks. It covers the Rules of Hooks, a window-size hook, and an Axios-based data-fetching hook with useEffect cleanup, loading, and error handling.
Syllabus
Intro
Welcome
Quick Set Up
Rules of Hooks
React Custom Hooks are like recipes
Creating the useWindowSize custom hook
Reviewing the useWindowSize custom hook
Applying useWindowSize to the React App
Remember the useEffect clean up function
Creating the useAxiosFetch custom hook
Reviewing the useAxiosFetch custom hook
Applying useAxiosFetch to the React App
Final clean up
Taught by
Dave Gray