-
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
Consolidate hook events #7472
Consolidate hook events #7472
Commits on Aug 11, 2016
-
Remove onBeforeMountComponent hook event
It is unnecessary. We now pass the element as part of onInstantiateComponent, and it can't change before mounting.
Configuration menu - View commit details
-
Copy full SHA for 9db9a34 - Browse repository at this point
Copy the full SHA 9db9a34View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ae6186 - Browse repository at this point
Copy the full SHA 1ae6186View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for cf702b1 - Browse repository at this point
Copy the full SHA cf702b1View commit details -
Remove onComponentHasUpdated hook
The tests still pass so presumably it was not necessary.
Configuration menu - View commit details
-
Copy full SHA for bf58f38 - Browse repository at this point
Copy the full SHA bf58f38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d841a1 - Browse repository at this point
Copy the full SHA 1d841a1View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 315471e - Browse repository at this point
Copy the full SHA 315471eView commit details -
Remove onMountRootComponent hook event
It is unnecessary now that we pass the parent ID to onBeforeMountComponent.
Configuration menu - View commit details
-
Copy full SHA for 0b68348 - Browse repository at this point
Copy the full SHA 0b68348View commit details -
Use parentDebugID = 0 both for roots and production
This removes some awkward branching.
Configuration menu - View commit details
-
Copy full SHA for ac7aa31 - Browse repository at this point
Copy the full SHA ac7aa31View commit details