Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/reduxjs/reselect into bum…
Browse files Browse the repository at this point in the history
…p-vitest
  • Loading branch information
aryaemami59 committed Jan 3, 2024
2 parents 2d20e1b + 6a44706 commit 476a09d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/weakMapMemoize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export function weakMapMemoize<Func extends AnyFunction>(
terminatedNode.s = TERMINATED

if (resultEqualityCheck) {
const lastResultValue = lastResult?.deref() ?? lastResult
const lastResultValue = lastResult?.deref?.() ?? lastResult
if (
lastResultValue != null &&
resultEqualityCheck(lastResultValue as ReturnType<Func>, result)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/api/createSelectorCreator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Accepts either a `memoize` function and `...memoizeOptions` rest parameter, or s
| Name | Description |
| :----------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `options` | An options object containing the `memoize` function responsible for memoizing the `resultFunc` inside <InternalLinks.CreateSelector /> (e.g., `lruMemoize` or `weakMapMemoize`). It also provides additional options for customizing memoization. While the `memoize` property is mandatory, the rest are optional. |
| `options.argsMemoize?` | The optional memoize function that is used to memoize the arguments passed into the <InternalLinks.OutputSelector /> generated by <InternalLinks.CreateSelector /> (e.g., `lruMemoize` or `weakMapMemoize`). <br /> **`Default`** = `lruMemoize` |
| `options.argsMemoize?` | The optional memoize function that is used to memoize the arguments passed into the <InternalLinks.OutputSelector /> generated by <InternalLinks.CreateSelector /> (e.g., `lruMemoize` or `weakMapMemoize`). <br /> **`Default`** = `lruMemoize` before 5.0.0 and `weakMapMemoize` after |
| `options.argsMemoizeOptions?` | Optional configuration options for the `argsMemoize` function. These options are passed to the `argsMemoize` function as the second argument. <br /> since 5.0.0 |
| `options.inputStabilityCheck?` | Overrides the global input stability check for the selector. Possible values are: <br /> `once` - Run only the first time the selector is called. <br /> `always` - Run every time the selector is called. <br /> `never` - Never run the input stability check. <br /> **`Default`** = `'once'` <br /> since 5.0.0 |
| `options.memoize` | The memoize function that is used to memoize the `resultFunc` inside <InternalLinks.CreateSelector /> (e.g., `lruMemoize` or `weakMapMemoize`). since 5.0.0 |
Expand Down
2 changes: 1 addition & 1 deletion website/docs/introduction/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For standalone usage, install the `reselect` package:

## Basic Usage

Reselect exports a `createSelector` API, which generates memoized selector functions. `createSelector` accepts one or more input selectors, which extract values from arguments, and a result function function that receives the extracted values and should return a derived value. If the generated output selector is called multiple times, the output will only be recalculated when the extracted values have changed.
Reselect exports a `createSelector` API, which generates memoized selector functions. `createSelector` accepts one or more input selectors, which extract values from arguments, and a result function that receives the extracted values and should return a derived value. If the generated output selector is called multiple times, the output will only be recalculated when the extracted values have changed.

You can play around with the following **example** in <Link to='https://codesandbox.io/s/reselect-example-g3k9gf?file=/src/index.js'>this CodeSandbox</Link>:

Expand Down

0 comments on commit 476a09d

Please sign in to comment.