Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.25 KB

Stores.md

File metadata and controls

61 lines (40 loc) · 1.25 KB

Stores

A number of stores can be supported through a simple adapter for each

  • Redux
  • MobX
  • Immer
  • Unstated
  • ...

Concepts

Note: middleware and transport can be configured individually for each model if needed. This means that you can sync models with different backends or APIs, f.ex some using in-memory backing while others connect to a server backend/api etc.

Redux

  • model (implicit)
  • actions
  • reducers
  • selectors (views)
  • middleware

MobX

  • model
  • actions
  • views
  • middleware

MobX State Tree

  • model (with types and validation)
  • actions
  • views
  • middleware

Note: You can adapt a MobX state tree to Redux as well.

JSON schema to MobX

Use jsonschema-to-mobx-state-tree to transform a JSON schema to a MobX State Tree model.

JSON data to MobX

See:

Immer

Unstated