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. Learn more →
Top 23 TypeScript state-management Projects
-
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.
-
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!
-
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.
-
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-10Start a discussion about what you'd like to see and I'll do my best. https://github.com/tanstack/router/discussions
-
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.
-
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.
-
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 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.
-
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.
-
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.
-
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.
-
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-11Pullstate. It's a lot like svelte's store.
-
-
@grammarly/focal — use RxJS like it was normal data in React, no need to sub/unsub manually
-
-
Project mention: Remesh: A DDD framework for large and complex TypeScript/JavaScript applications | reddit.com/r/reactjs | 2022-07-30
-
Check it out at harlemjs.com or view the demo app.
-
-
-
bloc.js
A predictable state management library that helps implement the BLoC design pattern in JavaScript
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.
-
-
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.
TypeScript state-management related posts
- Administrando el estado con React Query. 〽️
- RxJS Pipelines
- Typescript Explicit States for pages
- [AskJS] What state manager do you use in your applications?
- 3 min demo - Socio - A WebSocket based realtime duplex Full-stack synced API framework
- State management, possible alternatives to redux
- State of Akita - superseded by Elf?
-
A note from our sponsor - InfluxDB
www.influxdata.com | 21 Mar 2023
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 |