
Discover React hooks that let functional components read and update state by hooking class functionality. Learn how hooks simplify development, boost performance, and guide migration toward hooks alongside Redux.
Identify the two rules of using hooks: keep hooks at the top level to avoid nesting, and never call hooks outside of a function, including the use effect hook.
This lecture offers a basic overview of four main hooks—useState, useEffect, useContext, and useReducer—and their roles in local versus global state via context.
Discover how useState initializes local state in functional components, returning [state, setState], with separate setters for each property, avoiding this and props, and optional additional state via another useState call.
Explore the useEffect hook and its three usage patterns: no second argument, empty array (mount, like componentDidMount), and value array (trigger on change).
Discover how the useReducer hook uses a first argument as the state value and a second argument as a function that changes the state, dispatch actions, and mirror redux patterns.
Explain context as a means to pass a value from a parent to deeply nested components, enabling a global state, read and update via the provider.
Create a context with React.createContext, wrap the app in a provider with a value prop, then use useContext to read and update the global state.
Explore a Redux to React hooks migration with minimal changes: keep actions and reducers intact, export both initial state and reducer, pass them to useReducer, and follow a code example.
Explore a table that compares six ways to read an update state in React, helping you quickly resolve confusion and refer back to this table.
Demonstrate building a basic app by wiring a React hook alongside existing Redux code. Compare React hooks and Redux side by side while integrating them into the project.
Turn a class component into a functional React hook using React 16.8+, set up a hooks folder, and build a hooks container to test the app.
Learn to use the useState hook in React by importing, destructuring, initializing to zero, and updating state with a set function through simple increment and decrement examples.
Learn to implement the useEffect hook in a React app by importing useEffect, wiring it to state with useState, and using a 3000 ms timeout to update and render values.
Learn to implement the use reducer hook by importing a reducer, initializing state, and dispatching actions via action creators to drive user interface updates.
Implement a global state using React context by wrapping root app with a provider and exposing state via the value prop. Use useContext to read and update state across components.
Set up global state with context using the useReducer hook, mirroring redux with success and failure actions; expose state and dispatch, and toggle Prop 2 via two buttons.
Explore React hooks in action by building a form that updates state with useState, useReducer, and useContext, handling live input and submit events.
Explore implementing form state with useReducer, creating action types and action creators for input change and submit, and wiring a reducer and dispatch to manage user text in the form.
learn to add global state to a form by wiring a user reducer to context, using context to dispatch actions, persist events, and display state across components.
React Hooks?
React Hooks are the biggest fundamental change to React since React Fiber in Late 2017.
Previous tutorials with Redux and older patterns are becoming obsolete. Stay competitive and learn the current and future version of React.
I will show you how to migrate from React-Redux to React hooks without changing any of your Redux Code
What this course will cover?
We will begin with a detailed explanation about each of the major hooks. Then once we understand the hooks at a deep level we will begin coding.
I will give a detailed explanation of React hooks then we will go over how to integrate React Hooks into existing React - Redux projects. We will build these hooks from scratch so you will get the best of both worlds.
We will cover all the major hooks and I will show you how to write them in code.
By the end of the tutorial you will have the building blocks necessary to build complex apps.