Skip to content

Commit

Permalink
Fix docs for selectors that take arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaemami59 committed Nov 11, 2023
1 parent 212e889 commit c6dab42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,8 @@ A: Yes. `Reselect` has no dependencies on any other package, so although it was

### Q: How do I create a selector that takes an argument?

</summary>

Conceptually, Reselect works like this internally:

```ts
Expand All @@ -1538,8 +1540,6 @@ const finalSelector = (...args) => {

In other words, all the arguments passed to the selector function are immediately passed to all of the inputs.

</summary>

When creating a selector that accepts arguments in `Reselect`, it's important to structure your input and `output selectors` appropriately. Here are key points to consider:

1. **Consistency in Arguments**: Ensure that all positional arguments across `input selectors` are of the same type for consistency.
Expand Down

0 comments on commit c6dab42

Please sign in to comment.