TypeScript state-management

Open-source TypeScript projects categorized as state-management

Top 23 TypeScript state-management Projects

  • xstate

    State machines and statecharts for the modern web.

    Project mention: A cure for React useState hell? | dev.to | 2023-01-12

    But I want to impress upon you that this is just only one of many patterns you can use this hook for. While this is subjective, I am personally not a huge fan of Redux and this type of pattern. It has its merits, but I think once you want to start layering in new patterns for actions, Mobx, Zustand, or XState are preferable in my personal opinion.

  • rematch

    The Redux Framework

    Project mention: Learning Redux as a beginner and where to start | reddit.com/r/reactnative | 2023-02-02

    I use Rematch. It’s built on top of redux but without all the ridiculous boiler plate. I looked into Redux Toolkit but found it still requiring too much unneeded code.

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • platform

    Reactive State for Angular

    Project mention: I don't get why I should use Redux | reddit.com/r/webdev | 2023-03-09

    People always get it wrong and I see so many posts like this with answers all over the place. The Redux pattern is about so much more than state management or what you need to make the app work. There is a mindset and value system that most developers don't appreciate that the Redux pattern exemplifies. I use Angular and NGRX at work.

  • mobx-state-tree

    Full-featured reactive state management without the boilerplate

    Project mention: Ask HN: What is your favorite front end state management solution? | news.ycombinator.com | 2022-12-25

    mobx-state-tree (https://mobx-state-tree.js.org/)

    Benefits of it over mobx is data normalization with references and JSON patches which allow you sync complex state easily. Typed models are also a plus.

    Drawbacks are performance (see https://github.com/mobxjs/mobx-state-tree/issues/1267).

    Previously was using immer, which I loved because of immutability but moved off since classes and OOP didn't feel as natural as in mst.

    If I were to pick an alternative, might try redux with normalization https://redux.js.org/usage/structuring-reducers/normalizing-....

    And if I were to build a state management tool, I would prioritize a library that has

  • router

    🤖 Type-safe router w/ built-in caching & URL state management for JS/TS, React, Preact, Solid, Vue, Svelte and Angular

    Project mention: TanStack Router - Typesafe, state-management APIs, caching, framework agnostic | reddit.com/r/reactjs | 2022-11-10

    Start a discussion about what you'd like to see and I'll do my best. https://github.com/tanstack/router/discussions

  • effector-react

    Business logic with ease ☄️

    Project mention: Global, reactive data store vs local, colocated graphql query? | reddit.com/r/reactnative | 2023-03-20

    I've been using effector, together with the apollo-client for the last few years and, while it works, it's completely detached from the actual screens. In other words, you need to fetch everything (at startup) you might use at some point and it stays in the memory for the entire duration of the session. Error handling is also tricky as you need to explicitly subscribe to the specific error stores in order to render them. And, if something goes wrong, it's tricky to tell what data is actually used in the current screen, so it's almost impossible to do the Retry efficiently. OTOH the screens are nice and simple - no spinners, the data is just there, thus the app feels (and is) fast.

  • unstated-next

    200 bytes to never think about React state management libraries ever again

    Project mention: React state management libraries in 2022 | reddit.com/r/reactjs | 2022-05-18

    I'm still using unstated-next, its another straightforward one that extends useContext

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • constate

    React Context + State

    Project mention: What are your favorite small utility packages? | reddit.com/r/reactjs | 2022-10-14

    Another one I like is https://github.com/diegohaz/constate, also <100 lines, but it makes contexts much easier to use. FB also uses mostly contexts for state management.

  • akita

    🚀 State Management Tailored-Made for JS Applications

    Project mention: State of Akita - superseded by Elf? | reddit.com/r/Angular2 | 2023-01-05

    Akita repo seems dead, in the last year the activity has been nearly 0, check this issue for example: https://github.com/salesforce/akita/issues/1045 Akita does not support typescript 4.8.x, so users struggle to update it with the newer angular versions.

  • store

    🚀 NGXS - State Management for Angular

    Project mention: Selector Returning Entire State Rather Than State Slice | reddit.com/r/NGXS | 2022-03-22

    // In doing this refactoring I noticed that there is a 'bug' where the // application state is returned instead of this state slice. // This has worked this way since the beginning see: // https://github.com/ngxs/store/blame/324c667b4b7debd8eb979006c67ca0ae347d88cd/src/state-factory.ts // This needs to be fixed, but is a 'breaking' change. // I will do this fix in a subsequent PR and we can decide how to handle it.

  • useStateMachine

    The <1 kb state machine hook for React

    Project mention: Typescript Explicit States for pages | reddit.com/r/react | 2023-03-07

    I came across this library: useStateMachine which has the closest syntax to what I was hoping to use. I’d like know what the community thinks or has any guides/suggestions.

  • elf

    🧙‍♀️ A Reactive Store with Magical Powers

    Project mention: State of Akita - superseded by Elf? | reddit.com/r/Angular2 | 2023-01-05

    Seems that the focus is moving completely on Elf, Netanel itself removed Akita from Elf docs just 3 weeks ago: https://github.com/ngneat/elf/commit/4546d76f5adfc2c59cf188a1550c0a1d31fccd42

  • apprun

    AppRun is a JavaScript library for developing high-performance and reliable web applications using the elm inspired architecture, events and components.

    Project mention: Ask HN: What Happened to Elm? | news.ycombinator.com | 2023-02-10
  • pullstate

    Simple state stores using immer and React hooks - re-use parts of your state by pulling it anywhere you like!

    Project mention: I am sick and tired of react-redux. Who has some good alternatives? | reddit.com/r/reactjs | 2022-09-11

    Pullstate. It's a lot like svelte's store.

  • reatom

    Reatom - the ultimate state manager

  • focal

    Program user interfaces the FRP way.

    Project mention: Best React Developer Experience? | reddit.com/r/reactjs | 2022-07-11

    @grammarly/focal — use RxJS like it was normal data in React, no need to sub/unsub manually

  • teaful

    🍵 Tiny, easy and powerful React state management

  • remesh

    A CQRS-based DDD framework for large and complex TypeScript/JavaScript applications

    Project mention: Remesh: A DDD framework for large and complex TypeScript/JavaScript applications | reddit.com/r/reactjs | 2022-07-30
  • harlem

    Powerfully simple global state management for Vue 3

    Project mention: Harlem v3.0 Released | reddit.com/r/vuejs | 2022-12-19

    Check it out at harlemjs.com or view the demo app.

  • resso

    〄 The Simplest React State Manager

  • reactant

    A framework for building React applications (by unadlib)

  • bloc.js

    A predictable state management library that helps implement the BLoC design pattern in JavaScript

    Project mention: How I go with react native in late 2022 | dev.to | 2022-11-27

    there's another option that is not as practical as redux and zustand, but I like it. BLOC is a state management pattern (not necessarily a global state) that is so popular in the flutter community. this pattern is based on reactive programming and streams. Felix Angelov made bloc.js that help us to implement this pattern. as I said, it may not be a suitable option for enterprise-level react-native applications, but definately it's a cool library.

  • kairo

    A uniform interface for building front-end applications

  • Sonar

    Write Clean JavaScript Code. Always.. Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2023-03-20.

TypeScript state-management related posts

Index

What are some of the best open-source state-management projects in TypeScript? This list will help you:

Project Stars
1 xstate 23,075
2 rematch 8,351
3 platform 7,496
4 mobx-state-tree 6,656
5 router 4,605
6 effector-react 4,130
7 unstated-next 4,053
8 constate 3,804
9 akita 3,619
10 store 3,355
11 useStateMachine 2,292
12 elf 1,297
13 apprun 1,152
14 pullstate 1,010
15 reatom 811
16 focal 698
17 teaful 684
18 remesh 551
19 harlem 475
20 resso 327
21 reactant 242
22 bloc.js 179
23 kairo 154
Write Clean JavaScript Code. Always.
Sonar helps you commit clean code every time. With over 300 unique rules to find JavaScript bugs, code smells & vulnerabilities, Sonar finds the issues while you focus on the work.
www.sonarsource.com