A JavaScript library for predictable, maintainable global state management, usable with React or any other view library.
reduxjs/reselect
A TypeScript library for creating memoized selector functions that derive data from Redux or other plain JavaScript state.
- Stars
- 19,005
- Forks
- 666
- Open issues
- 38
- Last commit
- 23 hours ago
What is it?
Reselect provides createSelector, which builds memoized "selector" functions. You pass it one or more input selectors that pull values out of state, and a result function that computes a derived value from them. The output selector only recalculates when those extracted values change, and it returns the same reference when nothing has changed.
This lets Redux store only the minimal state while derived data is computed on demand. Selectors can also be composed, so the output of one selector can serve as an input to another. Reselect is included in Redux Toolkit, and it can also be installed standalone as the reselect package.
The library ships with memoization options such as weakMapMemoize, lruMemoize, and createSelectorCreator for customizing behavior, along with development-only checks for input stability and identity functions.
Key features
- 01Creates memoized selectors that skip recalculation when inputs are unchanged.
- 02Lets selectors be composed by using other selectors as inputs.
- 03Returns stable result references, which helps React-Redux and React avoid unnecessary re-renders.
- 04Offers createStructuredSelector for building selectors from an object of selectors.
- 05Supports custom memoization via createSelectorCreator, lruMemoize, and weakMapMemoize.
- 06Includes development-only checks for unstable input selectors and identity result functions.
Use cases
- Deriving filtered or aggregated data from Redux state without storing it redundantly.
- Feeding props to React components through React-Redux while avoiding unnecessary re-renders.
- Building layered selectors that compose small state queries into larger derived views.
- Applying memoized derived state to any plain JavaScript immutable data outside Redux.
Quick start
- 1
Install the standalone package with npm
npm install reselect - 2
Or use the Redux Toolkit, which already includes Reselect (no extra install needed)
Topics
FAQ
- What is reselect?
- A TypeScript library for creating memoized selector functions that derive data from Redux or other plain JavaScript state. Reselect provides createSelector, which builds memoized "selector" functions. You pass it one or more input selectors that pull values out of state, and a result function that computes a derived value from them. The output selector only recalculates when those extracted values change, and it returns the same reference when nothing has changed.
- Is reselect free to use? What license does it have?
- reselect is open source under the MIT license. Check the license terms before using it in commercial products.
- Is reselect still maintained?
- Actively maintained. The last commit to reselect was on Oct 21, 2026.
- What can I use reselect for?
- Deriving filtered or aggregated data from Redux state without storing it redundantly. Feeding props to React components through React-Redux while avoiding unnecessary re-renders. Building layered selectors that compose small state queries into larger derived views. Applying memoized derived state to any plain JavaScript immutable data outside Redux.
- How do I install reselect?
- Install the standalone package with npm: npm install reselect Or use the Redux Toolkit, which already includes Reselect (no extra install needed)
- Where can I get reselect?
- The source code and installation instructions are on GitHub: https://github.com/reduxjs/reselect
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A small, hook-based state-management library for React with no providers required.
Official React bindings for Redux, connecting Redux stores to React components via hooks and a Provider.
Async state management and data fetching library for web apps, with bindings for React, Vue, Svelte and Solid.
A JavaScript library that lets you write immutable state updates by mutating a draft copy of the current state.
A Redux middleware-style library that saves store state to storage and restores it when the app starts.