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

Consolidate hook events #7472

Merged
merged 8 commits into from
Aug 11, 2016
Merged

Consolidate hook events #7472

merged 8 commits into from
Aug 11, 2016

Commits on Aug 11, 2016

  1. Remove onBeforeMountComponent hook event

    It is unnecessary.
    We now pass the element as part of onInstantiateComponent, and it can't change before mounting.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    9db9a34 View commit details
    Browse the repository at this point in the history
  2. Remove onComponentHasMounted hook event

    It is unused after #7410.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    1ae6186 View commit details
    Browse the repository at this point in the history
  3. Replace on(Begin|End)ReconcilerTimer hook events

    We already have onBeforeUpdateComponent.
    Let's just have on(Before?)(Mount|Update|Unmount)Component and stick with them.
    
    This removes double event dispatches in some hot spots.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    cf702b1 View commit details
    Browse the repository at this point in the history
  4. Remove onComponentHasUpdated hook

    The tests still pass so presumably it was not necessary.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    bf58f38 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1d841a1 View commit details
    Browse the repository at this point in the history
  6. Replace on(InstantiateComponent|SetParent) with onBeforeMountComponent

    This lets us further consolidate hooks.
    The parent ID is now passed as an argument to onBeforeMountComponent() with the element.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    315471e View commit details
    Browse the repository at this point in the history
  7. Remove onMountRootComponent hook event

    It is unnecessary now that we pass the parent ID to onBeforeMountComponent.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    0b68348 View commit details
    Browse the repository at this point in the history
  8. Use parentDebugID = 0 both for roots and production

    This removes some awkward branching.
    gaearon committed Aug 11, 2016
    Configuration menu
    Copy the full SHA
    ac7aa31 View commit details
    Browse the repository at this point in the history