Structural Patterns: Compose Objects and Interfaces
Compare Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy with Java examples, costs, failure modes, and guidance for choosing a fit.
Compare Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy with Java examples, costs, failure modes, and guidance for choosing a fit.
Compare plain CSS with CSS modules, then learn how Vite handles imported files and public assets in React projects, with practical code examples.
Apply Tell, Don't Ask and the Law of Demeter to keep object rules near their data, reduce fragile navigation, and see when a direct query is clearer in context.
Learn to design object-oriented code around behavior, collaborator boundaries, and stable dependency seams, with practical tests that resist refactoring churn.
Learn to type React function component props, understand inferred return types, handle optional values safely, and compose small components with confidence.
Type callback and event handlers, use inference well, and build reusable React helpers and components with TypeScript generics and safe constraints.
Learn to model optional and nullable fields, narrow unknown values, and safely parse API or storage data in React with strict TypeScript checks.
Learn how TypeScript models objects and arrays, when to use interfaces, and how to type React props while keeping untrusted runtime data safe.
Learn how TypeScript infers values and when annotations help in React props and event handlers, with practical examples, pitfalls, and runtime safety notes.
Learn how TypeScript union types model React loading, success, and error states, with discriminated unions, safe narrowing, and practical failure handling.