illustration for Reusable State and Effects with React Hooks
pro

Reusable State and Effects with React Hooks

Instructor

Elijah Manor

57m closed-captioning
·
13 lessons
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.6
1020
people completed
Published 6 years ago
|
Updated 4 years ago

Previously, in order to add state or side-effects in React you had to create a Class Component. However, with the introduction of the Hooks proposal, you can now add state and effects to a Function Component. In addition, you can extract your hook logic and create a custom hook that can be shared across your app.

As I introduce the concepts of React hooks, I'll apply those concepts in various demos to see how they apply in different scenarios. I'll be converting Class Components to Function Components so you can see how they relate to each-other.

By the end of this course, you'll learn how to:

  • Run (and Skip) side-effects with the useEffect hook
  • Write a custom hook to share logic in your app
  • Simplify the Context API with the useContext hook
  • Update state with dispatch actions using the useReducer hook
  • Optimize Components with useMemo

Course Content

57m • 13 lessons

    You might also like these resources:

    illustration for Introduction to Cloudflare Workers
    Kristian Freeman・36m・Course

    Become familiar with the Workers CLI wrangler that we will use to bootstrap our Worker project. From there you'll understand how a Worker receives and returns requests/Responses. We will also build this serverless function locally for development and deploy it to a custom domain.

    illustration for Create an eCommerce Store with Next.js and Stripe Checkout
    Colby Fayock・1h 4m・Course

    This is a practical project based look at building a working e-commerce store using modern tools and APIs. Excellent for a weekend side-project for your developer project portfolio

    illustration for Practical Git for Everyday Professional Use
    Trevor Miller・1h・Course

    git is a critical component in the modern web developers tool box. This course is a solid introduction and goes beyond the basics with some more advanced git commands you are sure to find useful.