Rewriting Facebook Comments Plugin With React and Flux
summary
Rewrites Facebook’s third‑party Comments plugin and its moderation tool from the ground up using React, Flux, Flow, ES6, replaces JSX compilation with Babel, and adopts React 0.14/ReactDOM. Architecture uses component decomposition, unidirectional Flux stores, and optimistic updates to show new comments before server confirmation; Flow static annotations plus dev-only runtime checks catch type errors. Demoed working client-side rendering, server-side/React Native compatibility, and a team-wide migration that reduced boilerplate and stabilized the codebase.
AI-written summary · about
chapters (31)
- 0:00Intro
- 1:44Table hell
- 2:05and a link
- 4:41Synthetic events
- 5:45Virtual DOM ++
- 7:02Component v.0.14
- 7:29Another component
- 8:23Using JSX
- 9:07JSX-to-JS transform
- 9:31Transforms in 0.14
- 10:21JSX tools
- 13:01Stateless functional
- 14:13Revealing the magic
- 14:25Stateful
- 16:10Event handler
- 16:54State vs props
- 20:43How components talk
- 21:02Flux
- 22:21Store
- 22:34Actions
- 22:49Main app component
- 23:18Pure render mixin
- 23:43Impure render function
- 24:12Perf win
- 25:48Flow: custom types
- 26:01Flow: import types
- 26:13Runtime checks
- 27:05Dependencies
- 27:19ES6 Destructuring Assignment
- 27:34Arrow functions
- 27:50Object short notation
