Skip to content

Safe to pass different input selectors from different slices? #590

Answered by markerikson
n-ii-ma asked this question in Q&A
Discussion options

You must be logged in to vote

Sure, there's no problem there. In fact, that's part of the point of selectors in the first place - to encapsulate looking up date from different parts of the state.

We typically recommend defining selectors in a slice file, but it's up to you - Redux doesn't care where the selector function actually lives.

See https://redux.js.org/usage/deriving-data-selectors for more details.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by n-ii-ma
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants