asyncredux-selectors
Installation
SKILL.md
What Are Selectors?
Selectors are functions that extract specific data from the Redux store state. They provide three key benefits:
- Compute derived data - Transform or filter state into the format your widget needs
- Abstract state structure - Components don't depend on how the state is organized
- Enable caching (memoization) - Avoid unnecessary recalculations
The Problem: Repeated Computations
When displaying filtered or computed data, without selectors you might write:
// INEFFICIENT - filters the entire list on every access
state.users.where((user) => user.name.startsWith("A")).toList()[index].name;
This filtering operation runs every time the widget rebuilds, even when the data hasn't changed.