-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added nextState to Field/FieldArray shouldComponentUpdate #1171
Conversation
@Darmody, how's this? |
Why is the implementation of |
No good reason. I'll sync them. |
linting added comment explaining why getSyncError is different for Field and FieldArray
I was wrong. There is a good reason, and I have documented it with a comment. |
Hmm, @erikras, LGTM. I will try it in my project, and give you my feedback. |
Published in |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The
shouldComponentUpdate
needs bothnextState
andnextContext
to know whether or not it needs to update. IgnoringnextState
was previously causing issues withshallowCompare
, becausethis.state
wasnull
andnextState
wasundefined
(not passed).The sync error also needs to be pulled from
nextContext
to know whether or not it needs to update.This was originally raised in #1141.
@ooflorent, please review. (ignore the test in
FieldArray.spec.js
)