Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add instructions for bun and pnpm #621

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 38 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import { createSelector } from '@reduxjs/toolkit'
For standalone usage, install the `reselect` package:

```bash
npm install reselect

yarn add reselect
npm install reselect # with npm
yarn add reselect # with Yarn
bun add reselect # with Bun
pnpm add reselect # with pnpm
colinhacks marked this conversation as resolved.
Show resolved Hide resolved
```

## Basic Usage
Expand Down Expand Up @@ -77,37 +78,40 @@ console.log(selectTotal(exampleState)) // { total: 2.322 }

## Table of Contents

- [Installation](#installation)
- [Redux Toolkit](#redux-toolkit)
- [Standalone](#standalone)
- [Basic Usage](#basic-usage)
- [API](#api)
- [createSelector(...inputSelectors | [inputSelectors], resultFunc, selectorOptions?)](#createselectorinputselectors--inputselectors-resultfunc-selectoroptions)
- [defaultMemoize(func, equalityCheckOrOptions = defaultEqualityCheck)](#defaultmemoizefunc-equalitycheckoroptions--defaultequalitycheck)
- [createSelectorCreator(memoize, ...memoizeOptions)](#createselectorcreatormemoize-memoizeoptions)
- [Customize `equalityCheck` for `defaultMemoize`](#customize-equalitycheck-for-defaultmemoize)
- [Use memoize function from Lodash for an unbounded cache](#use-memoize-function-from-lodash-for-an-unbounded-cache)
- [createStructuredSelector({inputSelectors}, selectorCreator = createSelector)](#createstructuredselectorinputselectors-selectorcreator--createselector)
- [Development-only checks](#development-only-checks)
- [`inputStabilityCheck`](#inputstabilitycheck)
- [Global configuration](#global-configuration)
- [Per-selector configuration](#per-selector-configuration)
- [FAQ](#faq)
- [Q: Why isn’t my selector recomputing when the input state changes?](#q-why-isnt-my-selector-recomputing-when-the-input-state-changes)
- [Q: Why is my selector recomputing when the input state stays the same?](#q-why-is-my-selector-recomputing-when-the-input-state-stays-the-same)
- [Q: Can I use Reselect without Redux?](#q-can-i-use-reselect-without-redux)
- [Q: How do I create a selector that takes an argument?](#q-how-do-i-create-a-selector-that-takes-an-argument)
- [Q: The default memoization function is no good, can I use a different one?](#q-the-default-memoization-function-is-no-good-can-i-use-a-different-one)
- [Q: How do I test a selector?](#q-how-do-i-test-a-selector)
- [Q: Can I share a selector across multiple component instances?](#q-can-i-share-a-selector-across-multiple-component-instances)
- [Q: Are there TypeScript Typings?](#q-are-there-typescript-typings)
- [Q: How can I make a curried selector?](#q-how-can-i-make-a-curried-selector)
- [Related Projects](#related-projects)
- [re-reselect](#re-reselect)
- [reselect-tools](#reselect-tools)
- [reselect-debugger](#reselect-debugger)
- [License](#license)
- [Prior Art and Inspiration](#prior-art-and-inspiration)
- [Reselect](#reselect)
- [Installation](#installation)
- [Redux Toolkit](#redux-toolkit)
- [Standalone](#standalone)
- [Basic Usage](#basic-usage)
- [Table of Contents](#table-of-contents)
- [API](#api)
- [createSelector(...inputSelectors | \[inputSelectors\], resultFunc, selectorOptions?)](#createselectorinputselectors--inputselectors-resultfunc-selectoroptions)
- [defaultMemoize(func, equalityCheckOrOptions = defaultEqualityCheck)](#defaultmemoizefunc-equalitycheckoroptions--defaultequalitycheck)
- [createSelectorCreator(memoize, ...memoizeOptions)](#createselectorcreatormemoize-memoizeoptions)
- [Customize `equalityCheck` for `defaultMemoize`](#customize-equalitycheck-for-defaultmemoize)
- [Use memoize function from Lodash for an unbounded cache](#use-memoize-function-from-lodash-for-an-unbounded-cache)
- [createStructuredSelector({inputSelectors}, selectorCreator = createSelector)](#createstructuredselectorinputselectors-selectorcreator--createselector)
- [Development-only checks](#development-only-checks)
- [`inputStabilityCheck`](#inputstabilitycheck)
- [Global configuration](#global-configuration)
- [Per-selector configuration](#per-selector-configuration)
- [FAQ](#faq)
- [Q: Why isn’t my selector recomputing when the input state changes?](#q-why-isnt-my-selector-recomputing-when-the-input-state-changes)
- [Q: Why is my selector recomputing when the input state stays the same?](#q-why-is-my-selector-recomputing-when-the-input-state-stays-the-same)
- [Q: Can I use Reselect without Redux?](#q-can-i-use-reselect-without-redux)
- [Q: How do I create a selector that takes an argument?](#q-how-do-i-create-a-selector-that-takes-an-argument)
- [Q: The default memoization function is no good, can I use a different one?](#q-the-default-memoization-function-is-no-good-can-i-use-a-different-one)
- [Q: How do I test a selector?](#q-how-do-i-test-a-selector)
- [Q: Can I share a selector across multiple component instances?](#q-can-i-share-a-selector-across-multiple-component-instances)
- [Q: Are there TypeScript Typings?](#q-are-there-typescript-typings)
- [Q: I am seeing a TypeScript error: `Type instantiation is excessively deep and possibly infinite`](#q-i-am-seeing-a-typescript-error-type-instantiation-is-excessively-deep-and-possibly-infinite)
- [Q: How can I make a curried selector?](#q-how-can-i-make-a-curried-selector)
- [Related Projects](#related-projects)
- [re-reselect](#re-reselect)
- [reselect-tools](#reselect-tools)
- [reselect-debugger](#reselect-debugger)
- [License](#license)
- [Prior Art and Inspiration](#prior-art-and-inspiration)
colinhacks marked this conversation as resolved.
Show resolved Hide resolved

## API

Expand Down