reselect icon indicating copy to clipboard operation
reselect copied to clipboard

Can't set selector memoization function

Open srolel opened this issue 9 years ago • 1 comments

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

srolel avatar Nov 11 '17 02:11 srolel

Will be addressed in version 4

ellbee avatar Jun 22 '18 10:06 ellbee