Skip to content
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

Can't set selector memoization function #298

Closed
srolel opened this issue Nov 11, 2017 · 1 comment
Closed

Can't set selector memoization function #298

srolel opened this issue Nov 11, 2017 · 1 comment

Comments

@srolel
Copy link
Contributor

srolel commented Nov 11, 2017

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.

#297

@ellbee
Copy link
Collaborator

ellbee commented Jun 22, 2018

Will be addressed in version 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants