reselect
reselect copied to clipboard
Can't set selector memoization function
from index.js:68:
const selector = defaultMemoize(function () {
const params = []
const length = dependencies.length
for (let i = 0; i < length; i++) {
// apply arguments instead of spreading and mutate a local list of params for performance.
params.push(dependencies[i].apply(null, arguments))
}
// apply arguments instead of spreading for performance.
return memoizedResultFunc.apply(null, params)
})
Why should this not use the provided memoize? All tests pass with the change, but any other option to allow setting this will be very helpful. another helpful addition is passing memoizeOptions here as well, but this does break a test case which will have to be updated, although I do believe this is the expected behavior as an end user.
https://github.com/reactjs/reselect/pull/297
Will be addressed in version 4