Typing React Components in TypeScript (Practical Patterns)
Props, children, event handlers, generics in components, and common TS + React pitfalls interviewers ask about.
Practice
Search by concept, narrow to a roadmap, or pick a tag to focus on the exact topic you want to rehearse.
30 articles · page 3 of 4
Props, children, event handlers, generics in components, and common TS + React pitfalls interviewers ask about.
When to use enums, when to prefer string unions, and what const enums change.
A practical guide to TS compiler options interviewers ask about: strict, noImplicitAny, lib, moduleResolution, jsx, and incremental builds.
Learn TypeScript declaration merging with working interface and module augmentation examples, common compiler errors, and an interview exercise.
Understand conditional types, infer, and how TypeScript extracts types from functions/promises/arrays.
How `satisfies` helps validate shapes without losing literal types, and why it often beats `as const` and type annotations.
How narrowing works in TypeScript: typeof/in, custom type guards, assertion functions, and practical patterns for safer code.
How to choose any/unknown/never, why unknown is safer, and how never appears in narrowing and exhaustive checks.
A deep, interview-ready guide to TypeScript utility types: Pick/Omit/Partial/Required/Readonly/Record, common patterns, and how to avoid over-complicating types.