Creating React Libraries from Scratch
In this course we'll cover what it takes to maintain, write, and publish a React library from scratch.
What You Will Learn
Creating a React library from `yarn init` to deployed on npm
Setting up documentation for contributers and consumers
Keeping up with code quality while multiple people work on a project
Why this course
Building a library is so much more than just the code. We need to know the ins and outs of versioning, deploying, building, documenting, dependency management, module types, tooling, and more. This is a daunting task for just one tutorial to cover. Creating React Libraries from Scratch will teach you everything you need to know to succeed in creating a library.
Creating React Libraries from Scratch will dive into:
- initializing a new npm package
- maintaining code quality
- publishing to npm
- keeping contributors on track
- exposing modules that work in NodeJS and the Web
- Storybook for demoing components
- exposing typing using TypeScript
- and more!
Setting Up Our Project
Setting up the files and directories needed to write a React library.
What are Dependencies?
Introduction to project dependencies, devDependencies, and peerDependencies.
Installing Scroller's Dependencies
Installing dependencies for the Scroller library.
Initializing Git and GitHub
Setup Scroller using Git, create a new GitHub project, and how push code to GitHub.
Setting up ESBuild
Why do we need to bundle our code, and how can ESBuild help?
What are JS Modules, and how do they affect consumers of our code?
Building Multiple JS Modules
Updating ESBuild to export multiple JS module formats.
Deploying to NPM
How to configure and deploy to a public npm repository.
An introduction to maintainability in a React library.
Testing our code through unit tests.
Code linting and ensuring code style.
Git hooks to prevent bad commits.
19 lessons (1h 6m)
1 complete project
336 lines of code