
This lecture will walk you through the process of building the internals of a state manager:
The public API
The event emitter used to pipe state mutations to subscribers
How to use TypeScript generics to ensure type-safety for unknown types
With this stage complete you will have built the core library. In the next section we'll talk about how to distribute it!
This lecture will teach you how to use ts-packager to build and distribute your library for production. It'll also walk you through common gotcha's developers run into when distributing their libraries for Node.js, the Web, Common.js, and ES Modules
What's a state management library without bindings for your favorite UI frameworks?
In this section, we'll build a factory function for generating useState hooks from our State instances. We'll also demo what we've built so far in a React App.
Great state management libraries have two things in common.
Great performance
And a developer API for building tools on top of the library
In this section, we're going to build a developer facing API for our library and create a middleware for tracking the performance of our state updates!
In this last section we'll review what we've learned so far. Then go over some ways to model our stateful data along side functions that mutate it.
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:
Performant Updates and Subscriptions
Strict Type-safety through the use of TypeScript Generics
Support for third party developer features through a Middleware API
Compiling for ES Modules and Common.js projects
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:
Deeply understand the working internals of all state management solutions
Understand how the pub/sub model drives updates to your components and subscribers
Understand which state management solutions are best for the product you're currently working on
And easily build and ship your own open source libraries