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

no more index argument #48

Merged
merged 8 commits into from
Dec 17, 2018
Merged

no more index argument #48

merged 8 commits into from
Dec 17, 2018

Conversation

alexreardon
Copy link
Owner

@alexreardon alexreardon commented Dec 16, 2018

Closes #39
Closes #47
Rolls back #42

Rather than adding more arguments to our custom equality function: we provide examples on how to create higher order functions for passing in extra details to equality functions.

// recently added index in 4.1
- (a: mixed, b: mixed, index: number) => boolean
// removing it for compatibility reasons
+ (a: mixed, b: mixed) => boolean

This will be a breaking change as it will rollback the index argument

@@ -417,6 +417,44 @@ describe('memoizeOne', () => {
});
});

describe('skip equality check', () => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some extra tests to assert argument checking is opted out

@alexreardon
Copy link
Owner Author

Thoughts @ehtb?

@alexreardon
Copy link
Owner Author

/cc @treshugart

@alexreardon
Copy link
Owner Author

As a part of this I will be releasing 5.0 and deprecating 4.1

@alexreardon alexreardon merged commit 06bb861 into master Dec 17, 2018
@alexreardon alexreardon deleted the no-more-index branch December 17, 2018 00:12
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

Successfully merging this pull request may close these issues.

1 participant