---
title: "Rajat Malik (@codeswithrajat) | Hashnode"
description: "Simplifying modern web development — from Angular to architecture. Read the latest articles by Rajat Malik on Hashnode."
url: "https://hashnode.com/@codeswithrajat"
---

@codeswithrajat

# Rajat Malik

@codeswithrajat · India · Joined August 2025

Simplifying modern web development — from Angular to architecture.

[Website](https://www.rajatmalik.dev/)

### [10 Game-Changing Decorator Patterns Every JavaScript Developer Should Know](https://hashnode.rajatmalik.dev/10-game-changing-decorator-patterns-every-javascript-developer-should-know?utm_source=hashnode&utm_medium=feed)

Discover how decorators can clean up your code, enhance reusability, and help you write scalable, professional-grade Angular and JavaScript applications.

6 min read · [hashnode.rajatmalik.dev](https://hashnode.rajatmalik.dev/10-game-changing-decorator-patterns-every-javascript-developer-should-know?utm_source=hashnode&utm_medium=feed)

[Mar 24](https://hashnode.com/posts/10-game-changing-decorator-patterns-every-javascript-developer-should-know/69c2922c0d6a74097fb1922e)

### [Why Does Your Angular Component State Reset When You Move It? A Deep Dive into CDK Portals](https://hashnode.rajatmalik.dev/why-does-your-angular-component-state-reset-when-you-move-it-a-deep-dive-into-cdk-portals?utm_source=hashnode&utm_medium=feed)

Understanding the difference between recreating views and moving DOM elements

4 min read · [hashnode.rajatmalik.dev](https://hashnode.rajatmalik.dev/why-does-your-angular-component-state-reset-when-you-move-it-a-deep-dive-into-cdk-portals?utm_source=hashnode&utm_medium=feed)

[Jan 7](https://hashnode.com/posts/why-does-your-angular-component-state-reset-when-you-move-it-a-deep-dive-into-cdk-portals/695e5fe2447c839ef6691f93)

### [Migrating from Jasmine/Karma to Vitest in Angular 21: A Step-by-Step Guide Developer's Complete Guide](https://hashnode.rajatmalik.dev/migrating-from-jasminekarma-to-vitest-in-angular-21-a-step-by-step-guide-developers-complete-guide?utm_source=hashnode&utm_medium=feed)

Say goodbye to Karma, hello to lightning-fast tests with Vitest

12 min read · [hashnode.rajatmalik.dev](https://hashnode.rajatmalik.dev/migrating-from-jasminekarma-to-vitest-in-angular-21-a-step-by-step-guide-developers-complete-guide?utm_source=hashnode&utm_medium=feed)

[Dec 23, 2025](https://hashnode.com/posts/migrating-from-jasminekarma-to-vitest-in-angular-21-a-step-by-step-guide-developers-complete-guide/694a9968a033b95620d9dc82)

### [npx knip: The Smart Way to Detect Dead Code in Your JavaScript & TypeScript Projects](https://hashnode.rajatmalik.dev/npx-knip-the-smart-way-to-detect-dead-code-in-your-javascript-and-typescript-projects?utm_source=hashnode&utm_medium=feed)

Discover how one command can clean up thousands of lines of unused code and boost your codebase health

9 min read · [hashnode.rajatmalik.dev](https://hashnode.rajatmalik.dev/npx-knip-the-smart-way-to-detect-dead-code-in-your-javascript-and-typescript-projects?utm_source=hashnode&utm_medium=feed)

[Dec 15, 2025](https://hashnode.com/posts/npx-knip-the-smart-way-to-detect-dead-code-in-your-javascript-and-typescript-projects/69400d750e5f9811414470eb)

### [From 5MB to 500KB: The Hidden Cost of providedIn: 'root' in Angular – A Performance Deep Dive](https://hashnode.rajatmalik.dev/from-5mb-to-500kb-the-hidden-cost-of-providedin-root-in-angular-a-performance-deep-dive?utm_source=hashnode&utm_medium=feed)

How Angular's Tree-Shaking Actually Works (And How to Keep Your Bundle Lean in 2025)

7 min read · [hashnode.rajatmalik.dev](https://hashnode.rajatmalik.dev/from-5mb-to-500kb-the-hidden-cost-of-providedin-root-in-angular-a-performance-deep-dive?utm_source=hashnode&utm_medium=feed)

[Dec 3, 2025](https://hashnode.com/posts/from-5mb-to-500kb-the-hidden-cost-of-providedin-root-in-angular-a-performance-deep-dive/692faeedd7795bb4cc435d32)
