-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Add DEV-only checks for assumption about instance properties #14128
Conversation
if (__DEV__) { | ||
if (finishedWork.type === finishedWork.elementType) { | ||
warning( | ||
instance.props === finishedWork.memoizedProps, |
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.
I thought the whole point of your previous PR is that memoizedProps
does not include the resolved default props, but instance.props
does?
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.
Oh duh, didn't notice the outer check :D
Details of bundled changes.Comparing: f777d19...076460d react-dom
react-art
react-test-renderer
react-reconciler
react-native-renderer
scheduler
Generated by 🚫 dangerJS |
I started depending on this in #14112. Adding some DEV-only checks so that we notice if we break this.