Unleashing the Power of Duck-Typing in React: Crafting a Generic Application
summary
Shows how to build a working generic React+TypeScript platform that renders pages from an array of component models fetched per route id, using duck typing and type predicate functions to narrow unknown data. Implements a switchyard component that maps five component models (input, checkbox, button, accordion, text) to concrete UI, using useState and standard routing. Example app renders a simple form with text field, checkbox and an outlined submit button.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:12Duck typing benefits
- 6:11TypeScript for generics
- 11:43Components with interfaces
- 14:59SwitchArt component
- 18:38Routing in React
- 23:51Key takeaways
- 24:57Q&A
related talks
57mBuilding Scalable, Maintainable Apps Using TypeScript and React
42mTypeScript Patterns for Better React Components
10mGeneric Components with TS and React
48mWhy I chose to modularize the ducks in my React App
26mWhy I chose to modularize the ducks in my React App
30mSwipe Left, Uncaught TypeError Learning to Love Type Systems
57mTypeScript for React developers
15mTypeScript Patterns for Better React Components
