Flow Typing a React Codebase
summary
Adds Flow to a React codebase and shows concrete steps: annotate files incrementally to reach 100% coverage, use Babel to strip types but also publish .flow files alongside transpiled output, and fetch community libs with flow-typed. Demonstrates exact object types, read-only arrays/properties and generics to avoid common bugs, and warns that runtime checks are too slow for production so build two bundles and swap by NODE_ENV.
AI-written summary · about
chapters (14)
- 0:00Intro
- 3:13Why Static Analysis?
- 4:20Eslint
- 6:06Refactor
- 6:47Java/C#
- 7:44Type Script
- 8:27Escape Hatches
- 12:28React
- 16:05Publishing to npm
- 18:14flow-runtime
- 20:26Exact Object Types
- 22:01ReadOnlyArray
- 24:31Read Only Property
- 26:14Example Problem
related talks
32mStatic typing with Flow and TypeScript
23mFlow or how I learned to stop worrying and typecheck my React code
58mFlow - Am I Your Type?
42mStatic Type Checking with FlowType
43mFlow - Am I Your Type?
58mThe Road to a Statically Typed Future
01h 02mThe Road to a Statically Typed Future
22mMigrating 600k+ Lines of Code from Flow to TypeScript
