From c6dab42c176af270e953905ada0729c5a798d72d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Sat, 11 Nov 2023 00:12:18 -0600 Subject: [PATCH] Fix docs for selectors that take arguments --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 950731b26..04283c3c3 100644 --- a/README.md +++ b/README.md @@ -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? + + Conceptually, Reselect works like this internally: ```ts @@ -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. - - 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.