MobX
Two packages bring MobX to UI-Router:
| Package | Builds on | What it is |
|---|---|---|
| ui-router-mobx | @uirouter/core, mobx | RouterStore, an observable store of the router's current state, with no Lit |
| lit-ui-router-mobx | ui-router-mobx, lit-ui-router | Lit controllers that follow the router's store and any other MobX state |
ui-router-mobx is for MobX reactions that follow the route without Lit; lit-ui-router-mobx is for Lit components. Each package page has its own install snippet.
Both support MobX 6 and 7; MobX 6 and 7 covers the one difference the bindings' callers see.
In use
- Hello Solar System (MobX) runs the solar system tutorial on
lit-ui-router-mobx. - The MobX sample app keeps its client state in MobX stores through the same bindings.
- Both stand on the Altitude Atlas as bricks in sheet 2's model in the round, each sized by its authored files and seated on what it peers.