Reselect

Memoized selector functions for deriving data from Redux (or any) state

Library
npm
v5.3.0
19,013 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
86 /100 Excellent
Development Activity 96
Maintenance 84
Community 64
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
80 /100 Excellent
Architecture 82
Code Quality 85
Innovation 78
Learning Curve 75

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

  • createSelector for composing memoized selectors from one or more input selectors and a result function
  • createSelectorCreator for building custom selector factories with alternate memoization (lruMemoize, weakMapMemoize, or a custom function)
  • createStructuredSelector for building an object of selectors that maps directly onto a shape of derived state
  • Development-only inputStabilityCheck and identityFunctionCheck helpers 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

TypeScript
72%
AGPL 3.0

APITable

Databases · Low Code Platforms

15,623

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
68%
Apache 2.0

Appsmith

Automation · Developer Tools · No Code Platforms

40,959

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
93
Repo Health
79
Technical
66
Dependency
Built with
TypeScript 68%
Java 21%
Updated 1 weeks ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,916

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
90
Repo Health
77
Technical
61
Dependency
Built with
TypeScript 97%
Updated 1 weeks ago
Java
48%
Apache 2.0

ClearFlask

Community · Product Management

451

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.

View details
83
Repo Health
73
Technical
62
Dependency
Built with
Java 48%
TypeScript 47%
Updated 1 weeks ago
TypeScript
84%
Apache 2.0

Continue

AI Code Assistants · AI Development · Automation

36,049

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
73
Repo Health
88
Technical
62
Dependency
Built with
TypeScript 84%
Updated 6 days ago
TypeScript
48%
AGPL 3.0

Grafana

Analytics · Monitoring

76,962

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
63
Dependency
Built with
TypeScript 48%
Go 46%
Updated 5 days ago
TypeScript
77%
Other

Joplin

Note Taking

56,513

The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.

View details
93
Repo Health
87
Technical
60
Dependency
Built with
TypeScript 77%
JavaScript 14%
Updated 6 days ago
TypeScript
98%
Other

Kibana

Analytics · Monitoring

21,301

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.

View details
98
Repo Health
87
Technical
63
Dependency
Built with
TypeScript 98%
Updated 5 days ago
TypeScript
97%
Other

Lightdash

Analytics · Data Engineering

6,166

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.

View details
93
Repo Health
84
Technical
64
Dependency
Built with
TypeScript 97%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers