You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -15,6 +15,36 @@ By [Luke Latham](https://github.com/guardrex) and [Daniel Roth](https://github.c
15
15
16
16
The Blazor framework includes synchronous and asynchronous lifecycle methods. Override lifecycle methods to perform additional operations on components during component initialization and rendering.
17
17
18
+
The following diagrams illustrate the Blazor lifecycle. Lifecycle methods are defined with examples in the following sections of this article.
19
+
20
+
Component lifecycle events:
21
+
22
+
1. If the component is rendering for the first time on a request:
23
+
* Create the component's instance.
24
+
* Perform property injection. Run [`SetParametersAsync`](#before-parameters-are-set).
25
+
* Call [`OnInitialized{Async}`](#component-initialization-methods). If a <xref:System.Threading.Tasks.Task> is returned, the <xref:System.Threading.Tasks.Task> is awaited and then the component is rendered. If a <xref:System.Threading.Tasks.Task> isn't returned, render the component.
26
+
1. Call [`OnParametersSet{Async}`](#after-parameters-are-set). If a <xref:System.Threading.Tasks.Task> is returned, the <xref:System.Threading.Tasks.Task> is awaited and then the component is rendered. If a <xref:System.Threading.Tasks.Task> isn't returned, render the component.
27
+
28
+

29
+
30
+
Document Object Model (DOM) event processing:
31
+
32
+
1. The event handler is run.
33
+
1. If a <xref:System.Threading.Tasks.Task> is returned, the <xref:System.Threading.Tasks.Task> is awaited and then the component is rendered. If a <xref:System.Threading.Tasks.Task> isn't returned, the component is rendered.
34
+
35
+

36
+
37
+
The `Render` lifecycle:
38
+
39
+
1. If this isn't the component's first render or [`ShouldRender`](#suppress-ui-refreshing) is evaluated as `false`, don't perform further operations on the component.
40
+
1. Build the render tree diff (difference) and render the component.
0 commit comments