Open davidebriani opened 3 years ago
Here are three libraries with distinct approaches to state management that we can evaluate.
Architecture | Async data | Data persistency | Typescript support | Testing/debugging | Community/Ecosystem |
---|---|---|---|---|---|
Flux, clean and opinionated but boilerplaty | Needs additional (opinionated) middleware: redux-thunk, redux-saga | With redux-persist | Yes, boilerplaty | Great. Redux DevTools and time-travel | Rich and mature |
Pros:
Cons:
Architecture | Async data | Data persistency | Typescript support | Testing/debugging | Community/Ecosystem |
---|---|---|---|---|---|
Atomic, simple and follows React style | Easy to do and supports concurrent mode/Suspense | No support but can be easily done manually | Yes | Good. Time-travel and snapshots | Young, still experimental |
Pros:
Cons:
Architecture | Async data | Data persistency | Typescript support | Testing/debugging | Community/Ecosystem |
---|---|---|---|---|---|
Proxy, OOP style. Opinionated with MobX-State-Tree | Easy to do but up to you | No support but can be easily done manually | Yes | Good, has a DevTools extension | Not so stable APIs but mature ecosystem |
Pros:
Cons:
As we keep evolving the Dashboard, we'd like to have a streamlined and consistent way to manage state and data within the web app. Several factors should be considered for each potential approach: