Skip to main content

Command Palette

Search for a command to run...

Week 3 Recap: Patterns + Debugging

Week 3 is done. Six posts, all circling the same idea — the difference between using a tool and actually understanding it shows up exactly when things get subtle, not when they're simple.

Updated
2 min readView as Markdown
Week 3 Recap: Patterns + Debugging
J
Jayesh Sojitra | AI & Frontend

Day 16 — Generics Explained With Real Examples The problem generics solve: type safety without losing reusability. One function, works with any type, no any required. Revisited Day 2's useLocalStorage hook, made properly type-safe.

Day 17 — Compound Components: A Pattern Worth Learning The pattern behind <select><option>, and behind Radix UI, Headless UI, and most component libraries. Trades a growing props API for flexible composition, via shared Context.

Day 18 — Server Components vs Client Components The deeper version of Day 5's split. The key pattern most people miss: children passed as props from a Server Component stay server-rendered, even inside a Client Component wrapper — push the 'use client' boundary down, not up.

Day 19 — 5 React Bugs I See Constantly Stale closures, index-as-key, direct mutation, unstable dependency array references, missing cleanup. All five are invisible in a surface read — none throw an obvious error, they just quietly produce wrong behavior.

Day 20 — What I Actually Look for in a Frontend Code Review Correctness (the Day 19 bug patterns), API clarity, test quality, accessibility — not style, which a linter should handle. Blocking issues, suggestions, and genuine questions get labeled differently.

Day 21 — 3 Ways to Share State Across Microfrontends Custom events for loose coupling, a shared state library for tight synchronization, URL parameters for shareable/bookmarkable state. No single right answer — match the method to how tightly coupled the actual need is.

The thread connecting all six:

Every post this week was really about the same thing from a different angle: the subtle, invisible mechanics underneath React and TypeScript — closures, reference equality, type inference, component composition, coupling — are exactly what separate code that happens to work from code you actually understand. None of these six topics are exotic; all six are things almost every React/TypeScript codebase touches constantly.

A genuine question before Week 4:

Week 4 covers forms, animation, build tools, security, and wraps up with career-focused posts. Is there a specific topic from Weeks 1-3 you'd want a deeper, hands-on follow-up on before we move into new territory?

Takeaway: Six posts, one underlying pattern: the bugs, patterns, and architecture decisions that actually matter are usually invisible until you know exactly what to look for. Once you do, you start catching them before they ship, not after.

30 Days of AI

Part 1 of 50

A 30-day series breaking down AI concepts, tools, and prompts in plain, jargon-free language — for beginners and professionals who want to actually understand and use AI, not just talk about it.

Up next

3 Ways to Share State Across Microfrontends

Module Federation (Day 6) solves how to share code between microfrontends. It doesn't solve how to share state — that's a separate problem, with its own set of tradeoffs.