Skip to content

Commit

Permalink
Give internal memoize callback functions names for dev readability
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Jun 7, 2022
1 parent b8cbd19 commit d49e4e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function createSelectorCreator<
const dependencies = getDependencies(funcs)

const memoizedResultFunc = memoize(
function () {
function recomputationWrapper() {
recomputations++
// apply arguments instead of spreading for performance.
return resultFunc!.apply(null, arguments)
Expand All @@ -117,7 +117,7 @@ export function createSelectorCreator<
)

// If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
const selector = memoize(function () {
const selector = memoize(function dependenciesChecker() {
const params = []
const length = dependencies.length

Expand Down

0 comments on commit d49e4e1

Please sign in to comment.