-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support for re-reselect #21
Comments
Hey @bdurrer - I don't use re-reselect in my own apps, so I never thought about this use case. However, if you can come up with a way to get it to work I'd be happy to take a PR |
Is this just an issue with re-reselect support, or is it an issue with any multi-arity selector? In So in summary:
|
Thanks for the info! You're correct that it's probably more a consequence of the second argument - I've never had to use that myself since I tend to think of selectors more as a mechanism for holding whole-app computed state. |
Maybe displaying all cached re-reselectors is not practicable anyway. I guess it could also have a negative impact on performance. How about having a second parameter on The function would simply return the required input for one of the cached re-reselectors. One could easily make that function dynamically switch caches based on some extern data, e.g. a global cache-key variable, so you can browse through the selectors based on an external controller. e.g. something like
would then call the selector like this
|
I am a bit suprised to not find anything on google or the issue log here, so maybe I am just doing it wrong :)
We have a lot of re-reselect selectors, but as soon as I add them to
registerSelectors
, I get log-spam from re-reselect, because the re-selector'skeySelector
is called without the mandatory cache key parameter.I guess the tools would need some way to give the keySelector the correct parameters, eg a helper that you could provide or by inspecting the cached selectors. I managed to get a partial view on the selector by fetching one of the cached selectors directly:
The text was updated successfully, but these errors were encountered: