Skip to content

Instantly share code, notes, and snippets.

@mweststrate
Created March 11, 2018 10:36
Show Gist options
  • Save mweststrate/a58a7b497f37c0cbb96975300cc01197 to your computer and use it in GitHub Desktop.
Save mweststrate/a58a7b497f37c0cbb96975300cc01197 to your computer and use it in GitHub Desktop.
doc structure proposal.md
  • philosophy
  • overview
    • observables
    • reactions: autorun
    • derived values: computed
    • actions

Making things observable

  • observable.box
  • observable.object
  • observable.array
  • observable.map
  • observable classes
    • decorate
  • decorators overview

Deriving values

  • computed properties
  • computed funtions
  • what will mobx react to?

Managing side effects

  • side effects versus derived values
  • autorun
  • reaction
  • when
  • async actions

Creating actions

  • benefits of actions
  • action
  • @action.bound
  • asynchronous processes
  • enforcing actions

MobX & (P)React

  • observer
  • provider & inject

Working with observables

  • keys
  • values
  • has
  • get
  • set
  • remove
  • toJS

Creating observable data sources

  • onBecome(Un)observed
  • createAtom
  • fromPromise
  • fromResource
  • fromStream

Troubleshooting

  • trace
  • caveats
  • enabling decorator syntax
  • React performance tips
  • React devtools

Recipes

  • stores
  • serialization

Utilities

  • configure
  • onReactionError
  • extendObservable
  • observe
  • intercept
  • spy
  • transaction
  • untracked
  • reflection
    • isXXX (ArrayLike, Computed, ComputedPrp, Action, Observable ObservableArray, ObservableMap, ObservableObject, ObservableProp)
    • getAtom
    • getDebugName
    • getDependencyTree
    • getObserverTree

Resources

Contributing

  • donate
  • helping out
@pavanpodila
Copy link

pavanpodila commented Mar 11, 2018

How about we divide it into two major sections?

MobX Quick start

This section will help newcomers to quickly adopt MobX and provides enough hand holding to tackle simple State Mgmt with MobX.

  • Installation
  • Philosophy
  • creating observables
  • derivations
  • actions and side-effects
  • Observation on React
  • Basic Recipes

Advanced MobX

Based on the assumption that the users are comfortable with MobX, we can go further with more complex use cases. This is also a quick jump point for advanced users. They don't have to go thru basics and jump straight over here and bookmark the page too!

  • Advanced observables and actions
  • Advanced Recipes
  • Utilities
  • Troubleshooting
  • Resources
  • Contributing

@mweststrate
Copy link
Author

Great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment