Module 5 Introduction

Introduction to module 5: Custom hooks

Project Source Code

Get the project source code below, and follow along with the lesson material.

Download Project Source Code

To set up the project on your local machine, please follow the directions provided in the README.md file. If you run into any issues with running the project source code, then feel free to reach out to the author in the course's Discord channel.

This lesson preview is part of the The newline Guide to Modernizing an Enterprise React App course and can be unlocked immediately with a \newline Pro subscription or a single-time purchase. Already have access to this course? Log in here.

This video is available to students only
Unlock This Course

Get unlimited access to The newline Guide to Modernizing an Enterprise React App, plus 70+ \newline books, guides and courses with the \newline Pro subscription.

Thumbnail for the \newline course The newline Guide to Modernizing an Enterprise React App
  • [00:00 - 00:12] The upgrades to the hardware handler app are well underway now. In our last module, we went through each class component, refactoring it to use hooks, and improving the code's quality and flow thanks to ES lint.

    [00:13 - 00:28] Now it's time to take it one step further and find instances where we're dupl icating code across components, or we've got extra large components that could do with some simplification. This type of code presents prime opportunities to be refactored into custom hooks.

    [00:29 - 00:53] This module will cover identifying duplicate code across components that are good candidates to be refactored into custom hooks, simplifying large complicated components with lots of code by moving some of it out and into separate hooks, and leveraging hooks to work across multiple components, ultimately letting us delete code that becomes unnecessary . Are you ready to get even more confident with your hooks?