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's keySelector is called without the mandatory cache key parameter.
index.js:334 [re-reselect] Invalid cache key "undefined" has been returned by keySelector function.
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:
const cachedSelector = selector.getMatchingSelector(null /* this normally the state */, 'default' /* cache key param */);
reselectTools.registerSelectors({ cachedSelector });
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'skeySelectoris 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: