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

this addresses bug - shouldnot #2067 #2431

Closed
wants to merge 1 commit into from

Conversation

boazblake
Copy link
Contributor

Description

shouldNotUpdate throws an uncaught exception: vnode._state is undefined (vnode.state in v2)

Motivation and Context

When shouldNotUpdate is true, we should also copy the rest of the state of the old vnode (children, instance, dom) on the new one. Otherwise on the next cycle, the old vnode is unbaked, and thus unfit for diff.(#2067 (comment))

#2067

How Has This Been Tested?

Not Yet

Types of changes

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

Checklist:

  • [ x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [ x ] I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • [ x ] All new and existing tests passed.
  • I have updated docs/change-log.md

@boazblake boazblake marked this pull request as ready for review June 13, 2019 11:14
@boazblake boazblake requested a review from dead-claudia as a code owner June 13, 2019 11:14
@boazblake
Copy link
Contributor Author

@isiahmeadows let me know what tests to add - I saw @pygy had these

Copy link
Member

@dead-claudia dead-claudia left a comment

Choose a reason for hiding this comment

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

Other than my nit, if you could find a way to test this, that'd be awesome. BTW, it may be challenging as I've struggled to reduce that repro personally. (You may have to start by explicitly rendering the large component trees and try to reduce it into a manageable test case from there by unnesting the recursion where possible.)

render/render.js Show resolved Hide resolved
@boazblake boazblake force-pushed the fix-shouldnotupdate branch from 9b3c170 to c3b56e8 Compare June 13, 2019 16:59
@boazblake boazblake force-pushed the fix-shouldnotupdate branch from c3b56e8 to 964cad0 Compare June 13, 2019 17:05
@dead-claudia dead-claudia mentioned this pull request Jul 3, 2019
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants