Creating a React Hooks Library

Creating a React Hooks Library

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 16 Lessons (1h 47m) | 586 MB

The newline Guide to Creating a React Hooks Library

This course is a complete step-by-step guide to coding custom React Hooks and building a Hooks library from scratch. Confidently master React Hooks, a transformative update added since React version 16.8, that makes it much easier to reuse code as your React codebase grows.

In this course we’ll build a set of custom reusable hooks, a mini react-hanger clone, essentially going from nothing to a fully-automated publishing pipeline that follows the best practices. We will cover common Hooks APIs every React developer should know, then dive straight into implementing Custom React Hooks, similar to what you will find in leading React libraries in the open source React ecosystem.

Why this course
React Hooks promise to eliminate the difficulties of sharing state without writing class-based components. The challenge is that Hooks do away with the lifecycle methods and class-based semantics of state management that many React developers were familiar with. Learning React Hooks on your own can be time consuming, confusing and frustrating. With that in mind, The newline Guide to Creating a React Hooks Library, was created to provide a complete tutorial that fully covers React Hooks. Within a few hours you’ll have a strong grasp on React Hooks and how to implement them.

Course Topics
This course packs practical hands-on-instruction using and building React Hooks, along with the best practices you need to build wider React Hooks libraries others across your organization can use. The first module provides an overview of the React Hooks library project we’ll build, and we’ll set up a complete environment with tools for library development. The subsequent modules then take you through building with React Hooks and creating your React Hooks library, including:

  • Hooks API fundamentals
  • Developing custom React Hooks
  • How to write reusable React Hooks
  • Common React Hooks mistakes to avoid in your code
  • Transpilers and bundlers for JavaScript libraries
  • Using GitHub Actions to test, build, and lint your library
  • Publish your React Hooks library to NPM

We’ll use tools including React, TypeScript, Babel, as well as GitHub Actions to build, test, and package a React Hooks library available for others to download from NPM. Ultimately, build your own React Hooks library and learn the best practices that will make your code reusable. With these skills, you can contribute more confidently to any React codebase using React Hooks, and make your team more productive.

Table of Contents

1 Course overview
2 How to work with course materials
3 Setting up development environment
4 Setting up initial project setup
5 Setting up ESLint and Prettier
6 WebStorm ESLint Prettier setup
7 VSCode ESLint Prettier setup
8 Setting up TypeScript
9 Setting up testing environment
10 Hooks API Considerations
11 Implementing useBoolean hook
12 Testing useBoolean hook
13 Implementing useMap hook
14 Collecting hooks under index
15 Implementing object returning API
16 What’s transpilation.

Homepage