~/talk

MobX, or: Going from Mutable to Immutable to Reactive State Management

Talkat CityJS Conference 2020 · 2020-09-02..09-04· [frontend-architecture, react]
slides:none on file

A demo e‑commerce app with orders, currencies and exchange rates compares three approaches: mutable state that re‑renders the whole tree, immutable state with memo/useCallback that needs custom selectors, and observable state using useLocalObservable + observer and makeAutoObservable that only re‑renders the two rows affected when a currency changes. The code moves domain logic into factory observables for easy unit testing, splits currency lines into small components for performance, and recommends avoiding decorators; large companies (Microsoft, EA, Netflix, Amazon) use MobX. useLocalObservable + observer makeAutoObservable

AI-written summary · about

  1. 0:00Start
  2. 3:53Mutable Data
  3. 12:54Immutable Data
  4. 14:40Demo
  5. 17:25Observable Data
  6. 17:48Idiomatic MobX
  7. 21:19Computations are an orthnogonal render tree
  8. 26:06Split into small components
  9. 27:32Decouple doman logic and state from UI
  10. 30:30Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.