Commit d9a4287b authored by Robert Knight's avatar Robert Knight

Suppress warning about selector with an identity result function

The warning is correct that this is not really how Reselect is supposed to be
used, but it is intentional. Add a suppression with a comment explaining the
intent in case we find a nicer approach in future that better aligns with how
Reselect is supposed to be used.
parent 39e53204
......@@ -208,6 +208,19 @@ const searchUris = createShallowEqualSelector(
[],
),
uris => uris,
{
// This selector does the actual work in its "input" functions and then
// relies on Reselect not to call the identity result function if the
// result of the input function is value-equal to the previous result.
//
// This is not really how Reselect is supposed to be used, but it works.
//
// What we want to achieve is that the output doesn't change if the result
// is value-equal to the previous result (ie. the `state.frames` might
// have changed, but if the search URL array produced from them hasn't
// changed, the output reference should stay the same).
devModeChecks: { identityFunctionCheck: 'never' },
},
);
function getContentInfo(state: State) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment