Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build a State Management Library with TypeScript
Rating: 5.0 out of 5(1 rating)
12 students

Build a State Management Library with TypeScript

Build and ship your own state management library
Created byAlex Figliolia
Last updated 3/2024
English

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

5 sections5 lectures1h 12m total length
  • Building your State Manager22:01

    This lecture will walk you through the process of building the internals of a state manager:

    1. The public API

    2. The event emitter used to pipe state mutations to subscribers

    3. 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!

Requirements

  • Intermediate experience with JavaScript or Typescript

Description

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

Who this course is for:

  • Intermediate JavaScript and TypeScript developers looking to level up their skills
  • Intermediate JavaScript and TypeScript developers looking build and ship their own libraries