Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 1.12 KB

mobx.md

File metadata and controls

15 lines (10 loc) · 1.12 KB

Mobx

mobx-react
mobx chrome extension

Considering: immer - work with immutable state in a more convenient way. Can be used to simplify redux or mobx reducers.

The gist of mobx is:

  1. Define state and make it observable.
  2. Create a view that responds to changes in the State. (by making it a mobx-react observer)
  3. Modify the State (either through direct mutation or through an action)

Best practice: Currently using mobx-react inject when you need to access state variables via props (going forward reconsider due to changes).
Best practice: Have considered using the decorators, but not currently using them due to not being stable supported language feature.