Replies: 2 comments 11 replies
-
what if the post being selected changed? how would you know without re-invoking the selector? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I might be missing something, but that's pretty much how it works? Either upstream data (or loading states, other things that |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For example, when using
selectFromResult
to select a specific post via ID from an array of posts, the selector function should not be executed if the post ID did not change.Basically, memoize the result unless the function has changed, in which case, re-run the function.
This may be completely against the intended usage of selectFromResult, but I have seen code in the wild that uses
selectFromResult
this way.Beta Was this translation helpful? Give feedback.
All reactions