Reselect
Memoized selector functions for deriving data from Redux (or any) state
Repository Health
Technical Analysis
Reselect is a small library for creating memoized “selector” functions that compute derived data from state. Selectors built with createSelector only recompute when their input values actually change, and return the same reference otherwise — which is essential for libraries like React-Redux that rely on reference equality to skip unnecessary re-renders.
While most commonly paired with Redux (and bundled by default in Redux Toolkit), Reselect works with any plain JavaScript state tree. Version 5 added pluggable memoization strategies (lruMemoize, weakMapMemoize, experimental autotracking), development-only stability and identity-function checks, and significantly improved TypeScript performance for deeply nested selectors.
What You Get
createSelectorfor composing memoized selectors from one or more input selectors and a result functioncreateSelectorCreatorfor building custom selector factories with alternate memoization (lruMemoize,weakMapMemoize, or a custom function)createStructuredSelectorfor building an object of selectors that maps directly onto a shape of derived state- Development-only
inputStabilityCheckandidentityFunctionCheckhelpers that warn about common selector-authoring mistakes
Common Use Cases
- Deriving filtered/sorted/computed lists from Redux state without recalculating on every render
- Preventing unnecessary React-Redux component re-renders by returning stable references when derived data hasn’t changed
- Composing complex derived state from multiple smaller, reusable selectors
- Adding development-time warnings for selectors with unstable inputs or accidental identity result functions
Under The Hood
Architecture — createSelector (in createSelectorCreator.ts) wraps a chain of “input selectors” and a final “result function”: on each call it runs every input selector, compares the extracted values against the previous call’s inputs (via the configured argsMemoize), and only invokes the result function when at least one input has changed, otherwise returning the cached prior result by reference. createStructuredSelector builds on the same primitive to produce a selector whose output is a plain object assembled from a map of named sub-selectors.
Tech Stack — Pure TypeScript with zero runtime dependencies beyond its own memoization implementations. Reselect ships three interchangeable memoization strategies as separate modules — lruMemoize (a small LRU cache, the default), weakMapMemoize (tree-structured caching keyed by object identity via WeakMap, unbounded by size), and an experimental autotracking-based memoizer — selectable per-selector via createSelectorCreator’s options.
Code Quality — Tests are organized per-feature under test/ (lruMemoize.test.ts, identityFunctionCheck.test.ts, createStructuredSelector.withTypes.test.ts, etc.), plus a dedicated examples.test.ts that exercises the README’s own usage examples and doc-site FAQ snippets (docs/examples/FAQ/howToTest.test.ts), keeping documentation and tests in sync. Coverage is tracked via Coveralls and CI runs a dedicated build-and-test-types workflow to catch TypeScript regressions specifically.
API Design — The core createSelector([inputSelectors], resultFn) shape is minimal and composable — selectors can be passed as inputs to other selectors, letting complex derived state be built from small, independently testable pieces. Development-mode-only checks (inputStabilityCheck, identityFunctionCheck) are a notable DX touch: they catch two of the most common selector-authoring mistakes (unstable inputs, forgetting the result function) with console warnings in dev builds only, at no cost in production.
Used by 11 apps in this directory
APITable
Low Code Platforms · Databases
API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.
Appsmith
Developer Tools · Automation · No Code Platforms
Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.
Bigcapital
Invoicing Finance
Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.
ClearFlask
Product Management · Community
Open-source feedback management and roadmap tool that lets product teams collect, prioritize, and respond to user input — with AI-powered summarization and full self-hosting control.
Continue
Developer Tools · AI Development · AI Code Assistants
Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.
Grafana
Monitoring · Analytics
The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.
Joplin
Note Taking
The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.
Kibana
Analytics · Monitoring
Your open source window into the Elastic Stack — query, visualize, and act on data stored in Elasticsearch with real-time dashboards, AI-assisted search, and automated alerting.
Lightdash
Analytics · Data Engineering
The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.