Created
December 19, 2019 10:50
-
-
Save devversion/ea63e9b2a372340a088dc4a792b5f0bc to your computer and use it in GitHub Desktop.
View Engine Change Detection vs. CheckNoChanges
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
markProjectedViewsForCheck(view); | |
Services.updateDirectives(view, CheckType.CheckNoChanges); | |
execEmbeddedViewsAction(view, ViewAction.CheckNoChanges); | |
Services.updateRenderer(view, CheckType.CheckNoChanges); | |
execComponentViewsAction(view, ViewAction.CheckNoChanges); | |
// Note: We don't check queries for changes as we didn't do this in v2.x. | |
// TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message. | |
view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
markProjectedViewsForCheck(view); | |
Services.updateDirectives(view, CheckType.CheckAndUpdate); | |
execEmbeddedViewsAction(view, ViewAction.CheckAndUpdate); | |
// -> Check and Update **content** queries (not done in check no changes) | |
// -> Lifecycle hooks (not done in check no changes) | |
Services.updateRenderer(view, CheckType.CheckAndUpdate); | |
execComponentViewsAction(view, ViewAction.CheckAndUpdate); | |
// -> Check and Update **view** queries (not done in check no changes) | |
// -> Lifecycle hooks (not done in check no changes) | |
// -> Reset dirty state (not done in check np changes) | |
view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView); | |
shiftInitState(view, ViewState.InitState_CallingAfterViewInit, ViewState.InitState_AfterInit); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment