Blog

Context API vs Redux

•3 min read

Context and Redux both share state across a React app, but they solve different problems. Here's a practical way to choose, grounded in how each one actually re-renders consumers.

#react#redux#context#state-management

5 common TypeScript interview questions

•4 min read

The TypeScript questions that come up again and again in interviews: any vs unknown, interface vs type, generics, utility types, and type guards, explained with practical examples.

#typescript#interview#generics#utility-types#type-guards

Typing Polymorphic React Components in TypeScript

•4 min read

From optional props to union types, discriminated unions, and generic polymorphic components. Learn how each pattern works and when to use it.

#typescript#react#generics#advanced-types#components

Cognitive Surrender and Why You Should Still Write Code by Hand

•4 min read

Recent research shows 73% of AI users accept faulty answers without questioning them. For developers, this habit has a name: cognitive surrender — and the fix is simpler than you think.

#ai#llm#cognition#best-practices#developer-skills

Your tests pass. Your linter doesn't.

•4 min read

Most React challenges only check if your code passes the tests. We also check if your code passes the linter — because an app that works is not the same as an app that is well-written.

#react#hooks#best-practices#linting#useEffect

What useOptimistic Actually Saves You

•4 min read

It's not about lines of code. useOptimistic eliminates pending flags, manual rollbacks, and prop/state sync — the things you actually spend time debugging.

#react#hooks#useOptimistic#react19

Debounce vs Throttle: When to Use Each (and Why It Matters)

•6 min read

Debounce and throttle both control how often a function runs — but solve different problems. Learn when to use each, build them as React hooks, and avoid common mistakes.

#react#javascript#hooks#performance

Stop Fetching Data Sequentially When It Could Be Parallel

•7 min read

Fetching independent data one request at a time is one of the most common — and most expensive — performance mistakes in React apps. Here's how to spot it and fix it with Promise.all.

#fetching#promises#performance#async

You Probably Don't Need Redux Yet

•5 min read

Most React apps don't need global state libraries at the start. Server state, local state, and context cover almost everything — here's when to actually reach for Zustand or Redux.

#react#state-management#context#hooks

When to Replace Multiple useState with useReducer

•6 min read

Multiple useState calls that change together, handlers calling three setters in a row, state that gets out of sync — these are the signs it's time to reach for useReducer.

#useState#useReducer#refactoring

New way of passing ref to child in React 19

•4 min read

React 19 simplifies ref forwarding by treating ref as a normal prop. Learn how this change reduces boilerplate and improves component ergonomics.

#react19#refs

Composition vs Compound Components in React

•3 min read

Composition and compound components are not the same. Learn the key differences, when to use each pattern, and how to build reusable React UI with real code examples.

#compound-components#composition#context