TypeScript in React and API code
Type components, hooks, context and network boundaries well.
- TS.08.01Typing components and propsCoreJuniorBeing written
- TS.08.02Generic and polymorphic componentsMid-levelBeing written
- TS.08.03Typing hooks, reducers and contextCoreMid-level11 min
- TS.08.04Runtime validation at boundariesCoreMid-level11 min
Interview questions in this module
- How do you type a component that accepts all native button props plus your own?
- How do you type
useReduceractions safely? - How do you make sure API responses match your TypeScript types?
- How do you type a context so consumers never get
undefined? - How would you type a component that renders either a link or a button?