Skip to content

Commit

Permalink
Merge pull request #4686 from in-tech-gration/master
Browse files Browse the repository at this point in the history
Update deriving-data-selectors.md with call to selector with params
  • Loading branch information
EskiMojo14 committed Mar 21, 2024
2 parents 20aa126 + e64954c commit a6984eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/usage/deriving-data-selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,12 @@ const selectItemsByCategory = createSelector(
)
```

You can then use the selector like this:

```js
const electronicItems = selectItemsByCategory(state, "electronics");
```

For consistency, you may want to consider passing additional parameters to a selector as a single object, such as `selectThings(state, otherArgs)`, and then extracting values from the `otherArgs` object.

#### Selector Factories
Expand Down

0 comments on commit a6984eb

Please sign in to comment.