~/talk

Immutable Data and React

Talkat React.js Conf 2015 · on Thursday, 2015-01-29· [react, javascript]
slides:none on file

Persistent immutable data structures power fast equality checks and memoization by returning new versions instead of mutating, implemented with structural sharing so most nodes are reused. The open source library Immutable.js provides lists, maps and ordered maps that plug into React and Flux, enabling cheap shouldComponentUpdate checks, simple undo via a history of versions, and a constant-factor performance cost (roughly 3–5× in some cases) in exchange for O(log n) or O(1) reconciliation benefits.

AI-written summary · about

  1. 0:00Intro
  2. 2:38Persistent Immutable Data Structures
  3. 5:07Structural Sharing
  4. 5:20Directed Acyclic Graph
  5. 7:22reTrieve
  6. 7:33Index Trie
  7. 11:55Implementation as Trie, Interface as Lists and Maps!
  8. 13:22The Hash Array Mapped Trie (HAMT) is based on the simple notion of hashing a key and storing the key in a trie based on this hash value.
  9. 13:34Simplicity is hard work. But there's a huge payoff. The person who has a genuinely simpler system is going to be able to affect the greatest change with the least work. He's going to kick your ass.
  10. 14:16What problems does this solve anyway?
  11. 14:52Multithreading: There be dragons.
  12. 15:30Embracing Immutability enables JavaScript's future.
  13. 15:50Mutable objects complect Time and Value
  14. 16:02var identity; identity = "value"; identity = "next value"
  15. 16:40Immutable data removes complexity.
  16. 16:56The Many Mutators Problem.
  17. 17:46What changed?
  18. 20:21Dirty bits
  19. 21:11UI Framework coupling model class to view class.
  20. 21:29Immutable change tracking
  21. 23:08Memoization
  22. 24:48shouldComponentUpdate()
  23. 25:48Immutable Data is Faster
  24. 25:59Reconciliation is pretty damn fast.
  25. 26:43Flux stores contain mutable data.
  26. 27:13Reconciliation is pretty damn fast?
  27. 27:56Flux stores with immutable data!
  28. 28:49Flux store is an identity New immutable values as time passes
  29. 29:08Bonus: Undo is easy!
  30. 30:29No more mutable state stockholm syndrome.
~/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.