Codecademy's approach to component communication
summary
Codecademy rebuilds its entire learning environment in React and replaces callback soup with a small meta-programmed system of adapters that listen for broadcast events run tests call backend services and call setState directly on major components the adapter factory is a one-liner and the core fits in 120 lines of code the approach handles many mixed component layouts (editor browser terminal lessons) scales across dozens of courses and avoids Stores initially while remaining easy to evolve toward Flux patterns later
AI-written summary · about
chapters (21)
- 0:00Introduction
- 1:02Context
- 2:24Why React
- 4:01Why not Flux
- 5:26Why not callbacks
- 6:35Basic communication
- 6:47Adapters
- 9:00Dispatcher
- 9:10Oneliner
- 10:00Component adapter
- 10:31Communication needs
- 10:50Mixins
- 11:35Vending system
- 12:37Does it work
- 13:34Our communication needs
- 14:27We can approve everything
- 15:18Flux
- 15:59Data consistency
- 16:43Using Flux
- 19:00Data flow patterns
- 20:28Name spacing
related talks
27mReact: Learn Once Write Anywhere
27mI Heard React Was Good
05mReact is the new Lego - how we deal with a lot of components
19mLessons from adopting React Compiler
26mHow to Learn React, Next.js, or Anything
24mCode crimes for good component APIs
38mWriting highly reusable React components
51mBuilding Better Components — A Journey to a More Resilient Frontend
