From the course: Build Modern Web Apps with React, Hooks, State Management, and APIs Using Vite or Next.js

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Introduction to hooks wrapper hell

Introduction to hooks wrapper hell

Hello and welcome to module number 4. In this module, we'll learn about React Hooks in great detail. Let's start off with lesson number 1 that is Introduction to Hooks. Let's start with Recap. We are going to see how many hooks we have used so far. So the first one which we have used before is useStateHook. This hook is used for state management. The other one is useEffect. We used it a little but we are going to deep dive into learning about this hook. This hook is usually needed when we want to load some data on mounting of our components. And the other one is UseContextHook. This is used for centralized state management. If you can recall, we use this hook to create a context provider for us and we were keeping all the state-related values in a shared context to avoid prop-delinks. Let's understand why we need hooks. Hooks are needed for solving the problems of class components. As you know, that in React, first, we used to have class-based components. And after the introduction of…

Contents