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

[Shallow] Implement setState for Hooks and remount on type change #15120

Merged
merged 5 commits into from Mar 15, 2019

Commits on Mar 15, 2019

  1. Throw away old shallow renderer state on type change

    This worked in function components but was broken for classes. It incorrectly retained the old instance even if the type was different.
    gaearon committed Mar 15, 2019
    Configuration menu
    Copy the full SHA
    50f2262 View commit details
    Browse the repository at this point in the history
  2. Remove _previousComponentIdentity

    We only needed this because we didn't correctly reset based on type. Now we do so this can go away.
    gaearon committed Mar 15, 2019
    Configuration menu
    Copy the full SHA
    57d2911 View commit details
    Browse the repository at this point in the history
  3. Use _reset when unmounting

    gaearon committed Mar 15, 2019
    Configuration menu
    Copy the full SHA
    a052618 View commit details
    Browse the repository at this point in the history
  4. Use arbitrary componentIdentity

    There was no particular reason it was set to element.type. We just wanted to check if something is a render phase update.
    gaearon committed Mar 15, 2019
    Configuration menu
    Copy the full SHA
    8aee192 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4972adb View commit details
    Browse the repository at this point in the history