Build a State Management Library with TypeScript

Build and ship your own state management library

In this course you’ll learn to build your own State Management library and ship it to web and Node.js projects. Quick warning; this will not be a “build-my-first-library” type of course. We’re going to build a production-ready state manager, ready to be used anywhere in your day-to-day development.  We’ll cover everything from:

What you’ll learn

  • Learn to build a state management library with typescript.
  • Build a generic event emitter with typescript.
  • Get an in depth look at how generics create type-safety.
  • Learn to compile and ship your library for production.
  • Build bindings to make your state management library worth with UI frameworks like React.
  • Mature your state management API with middleware.

Course Content

  • Building your State Manager –> 1 lecture • 22min.
  • Compiling Your Library for Production –> 1 lecture • 7min.
  • How to create bindings for UI Libraries like React –> 1 lecture • 18min.
  • How to mature our State Management Library with a Developer API –> 1 lecture • 16min.
  • Review what we learned and discuss some design patterns –> 1 lecture • 9min.

Auto Draft

Requirements

In this course you’ll learn to build your own State Management library and ship it to web and Node.js projects. Quick warning; this will not be a “build-my-first-library” type of course. We’re going to build a production-ready state manager, ready to be used anywhere in your day-to-day development.  We’ll cover everything from:

  1. Performant Updates and Subscriptions
  2. Strict Type-safety through the use of TypeScript Generics
  3. Support for third party developer features through a Middleware API
  4. Compiling for ES Modules and Common.js projects
  5. Building bindings for UI libraries such as React

In addition to building a library, we’ll walk through design patterns, decisions, and how to take your library even further on your own.

 

What does the course look like?

In each chapter, you’ll build a core piece of the state manager’s functionality – the public API, the Event Emitter, as well as the bindings for React. You’ll master each step and gain a high-level understanding of how just about every web application’s state works under-the-hood.

 

Best of all, our build will be 100% dependency-free. We’re going to hand-code each and every component we need. By the end of this course, you’ll be able to:

 

  1. Deeply understand the working internals of all state management solutions
  2. Understand how the pub/sub model drives updates to your components and subscribers
  3. Understand which state management solutions are best for the product you’re currently working on
  4. And easily build and ship your own open source libraries