Articles by Sonu Kapoor

Curated links to my writing on Angular, Signals, JavaScript, and web performance - published across App Signal, CODE Magazine, Dev.to, Medium, SitePoint, and Playful Programming.

Angular Signals in the Real World: Smarter Inputs and Reactive Routing

See real-world scenarios where Signals fundamentally change how you design Angular applications.

From ASP.NET to Angular: My MVP Story - Sonu Kapoor

Technology has always been about two things: the joy of coding and the joy of sharing what I’ve learned with others. In this article, I share my story of becoming an MVP.

Optimizing Your Cart with Signals: Smarter State, Better Debugging

In this third and final article, we’ll extend our cart with production-ready features and show how Signals not only simplify reactivity, but also enhance observability, performance, and developer experience.

Angular Signal-Based Architecture: Building a Smarter Shopping Cart

In this second part, we’re going to build on that foundation. We’ll extend the CartService with a few critical capabilities such as removing items, clearing the cart, and tracking the number of products. We’ll also explore how this service integrates with Angular components and templates, using signals directly without the need for RxJS or the async pipe. Along the way, we’ll highlight how this approach enhances testability, performance, and debuggability.

Angular Signals: The End of RxJS Boilerplate?

In this article, I'll take a deep dive into Angular Signals, not merely as a new API, but as a new way of thinking about building applications. I'll explore their core primitives, signal(), computed(), and effect(), and understand how they seamlessly fit into Angular's vision for a zoneless, standalone component-driven future. I'll introduce the concept of LinkedSignal, a powerful feature that dramatically improves component-to-component reactivity without the tedious ceremony developers are used to.

The Angular Signals Revolution: Rethinking Reactivity

In this article, the first of a three-part series on Angular Signals, we won't rehash the official documentation. Instead, we'll take a fresh look at Signals from the perspective of someone building real-world apps, focusing on state management, performance, and debugging.

Unlocking Angular Performance: Optimization Techniques

Six high-impact strategies for faster Angular apps: image optimization, routing, deferrable views, smarter change detection, async pipe, and trackBy.

Angular Signals: A New Mental Model for Reactivity, Not Just a New API

Signals reframe how data flows through your app — a different mental model from RxJS and @Input/@Output patterns.

You’re Using NgRx Wrong: Real Mistakes That Cost Teams Weeks

The most common NgRx pitfalls — and pragmatic patterns to fix them without slowing down your team.

Beyond console.log: Smarter Debugging with Modern JavaScript Tooling

In this article, we’ll look at smarter, scalable debugging strategies. We’ll explore structured logging, global error capture, breadcrumb trails, and real-time monitoring using tools like AppSignal, all without introducing a framework or rewriting your codebase.

Dynamically Configuring the Swagger-Generated API Base Path in Angular

Inject a dynamic basePath into generated clients — no forking — compatible with NgModules and Standalone.

Understanding Tree Shaking in JavaScript: A Comprehensive Guide

What tree-shaking removes, how bundlers decide, and practical steps to keep bundles lean and fast.

Understanding Angular Ahead-of-Time (AOT) Compilation

AOT vs JIT, pitfalls, and debugging strategies for large-scale Angular apps.

Getting Started with Firebase and Angular in idx.dev

Build a real-time serverless app using Firebase with Angular — end-to-end walkthrough.

Mastering Angular Unit Testing: Best Practices and Tools

Testing strategy, ATL, and pragmatic workflows for maintainable Angular test suites.

Dynamic Forms in Angular 19: Creating Flexible and Scalable User Interfaces with Standalone Components

Practical patterns for dynamic forms with standalone components and clean validation.

Optimizing Angular Reactive Forms: Enhancing Performance with Lazy Validation and Async Validators

Advanced techniques to keep forms responsive: lazy validation, async validators, and more.

The Myth of 'Fix Later': Why Writing the Best Code Now is Essential

Why deferring quality hurts velocity — and practical habits that prevent it.

Custom Validators with ControlValueAccessor in Angular: Ensuring Robust Form Validations

Extend validation with CVA patterns and reusable constraints.

Mastering Angular: Dynamic Disabled States with Reactive Forms and ControlValueAccessor

Control field enable/disable logic with reactive forms and CVA.

Boosting Angular Performance with @defer and Lazy Loading

Use deferrable views and lazy routes to ship less JS at first paint.

The Importance of Upgrading Frameworks: A Case for Angular

Why keeping Angular current matters for security, compatibility, and team velocity.

Boosting Angular App Performance Using NgOptimizedImage

Leverage NgOptimizedImage for better image optimization and LCP.

Streamlining Communication: New Signals API in Angular 17.3

Component communication with the latest Signals primitives.

Mastering Angular Unit Testing: Best Practices and Tools

A comprehensive guide to writing maintainable tests with effective tooling and patterns.

Mastering Angular Unit Testing: Best Practices and Tools

Here's What the Pros Don't Tell You About Angular Unit Testing