Typed HOCs with Flow
summary
Shows how to type real React higher‑order components with Flow so the HOC returns a correctly typed enhanced component, using withData and withRandom examples that fetch and inject props, generics to infer P, and an exported hoc helper type. Demonstrates class and function component compatibility, object spread for prop merging, and that type inference removes duplicated prop declarations. Concrete examples compile and type‑check so the pattern actually works in practice.
AI-written summary · about
chapters (6)
related talks
30mFlow Typing a React Codebase
32mStatic typing with Flow and TypeScript
30mRecomposing your React application
50mWriting React Components: The Functional Way
42mStatic Type Checking with FlowType
23mDemystifying Higher order components and Render Props
49mTypescript + React
36mReusing Stateful Logic in React: HOC vs Render Props vs Hooks
