Introduction

Modern frontend applications are starting to look less like simple view layers and more like small databases running directly in the browser.

Think about an e-commerce catalog, an analytics dashboard, or an admin panel. In all of these cases, the UI isn’t just rendering data—it’s constantly slicing it, recombining it, and reacting to user input in real time. Filtering becomes one of the most common operations, and the most natural way to express it in JavaScript is still the familiar chain of Array.filter() calls:

const filtered = products

.filter(p => p.category === selectedCategory)