-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add array index as a final argument to createArraySelector combiner #20
Comments
This was intentional; memoization is bound to a "key" and array index doesn't make sense as a key because re-orders trigger |
Makes sense. Although it does optimise towards reselect-map in computation use case (which what this library was created for, so that makes sense 😆). I'm plugging in reselect-map for inputArray -> outputArray transformation to ensure output array only changes at particular indices where inputArray also changed and other elements remain unchanged. The behaviour with ordering is actually what I would be expecting. Hope you can help... What would be the easiest way for me to roll out the custom implementation? Would it be possible to expose a bit more of the API (eg. |
Yeah, we can definitely expose those. I think just exporting and then adding to the typescript definitions is all that needs to be done if you want to submit a pr, or I can try and tackle it sometime this week. |
cool, I'll have a go at it, thanks! |
In order to make this possible:
This is similar to what's already possible with keys for maps and objects.
The text was updated successfully, but these errors were encountered: