-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Mimic React Hook's dependencies comparison #374
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #374 +/- ##
==========================================
- Coverage 99.87% 99.87% -0.01%
==========================================
Files 18 18
Lines 804 781 -23
==========================================
- Hits 803 780 -23
Misses 1 1
☔ View full report in Codecov by Sentry. |
@@ -172,7 +172,23 @@ Calling them outside of build method leads to an unstable state and is therefore | |||
if (!i1.moveNext() || !i2.moveNext()) { | |||
return true; | |||
} | |||
if (i1.current != i2.current) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs need to be updated to match
LGTM, with a tiny bit of documentation needed Could you also add a changelog? |
Documenting has been done! You might wanna resolve the |
Looking good, thanks! |
#155
This PR changes the comparison behavior to mimic the React Hook dependencies comparison which uses
Object.is()
.Previously,
keys
are compared by the==
operator. The Dart==
operator works differently from the JavaScriptObject.is()
:Object.is()
Dart ==
This PR checks if a list of
keys
contain a value with the typenum
and proceeds to handle cases where the value is eitherNaN
or0.0
and-0.0
.