@@ -130,18 +130,18 @@ demonstrate.
130130
131131### Component Structure <a name =" component-structure " ></a >
132132
133- A component, as a rule, consists of the following classes: ` Component ` (with an inner ` Mediator ` implementation),
133+ A component, as a rule, consists of the following classes: ` Component ` (with an inner ` Mediator ` implementation),
134134` ComponentView ` , ` ComponentViewModel ` , and ` ComponentMediator ` :
135135
136136<img width =" 1016 " height =" 457 " alt =" PatternFX " src =" https://github.com/user-attachments/assets/28ea5b5f-7f86-4dc6-bc74-6c4ed3c1abd7 " />
137137
138138A natural question might arise: why is there no ` Model ` in the component, given that
139139the pattern is called MVVM? Firstly, a component is a building block for constructing a user interface, which might
140140not be related to the application's business logic at all. Secondly, the ` Model ` exists independently of the UI and
141- should have no knowledge of the component's existence. Thirdly, MVVM is fundamentally about the separation of
141+ should have no knowledge of the component's existence. Thirdly, MVVM is fundamentally about the separation of
142142responsibilities rather than the mandatory presence of all three layers in every element. In other words, a component
143- does not violate MVVM principles simply because it lacks a ` Model ` ; it remains compliant as long as the ` View ` and
144- ` ViewModel ` maintain a clear separation of concerns and communicate exclusively through data binding and observable
143+ does not violate MVVM principles simply because it lacks a ` Model ` ; it remains compliant as long as the ` View ` and
144+ ` ViewModel ` maintain a clear separation of concerns and communicate exclusively through data binding and observable
145145properties.
146146
147147The ` ComponentView ` and ` ComponentViewModel ` classes correspond to the ` View ` and ` ViewModel ` in the MVVM pattern and
@@ -216,6 +216,15 @@ restored from the `ComponentHistory` to the `ComponentViewModel`. Conversely, wh
216216` DEINITIALIZED ` , data from the ` ComponentViewModel ` is saved back to the ` ComponentHistory ` . The volume of state
217217information that is restored and persisted is defined by the ` HistoryPolicy ` enum.
218218
219+ In addition to the four main classes, a component may include a ` ComponentHistory ` , which preserves the component’s
220+ state across its lifecycle. In the default implementation, the ` ComponentHistory ` instance is lazily provided via a
221+ ` HistoryProvider ` that is set before initialization. During the ` preInitialize() ` phase, the provider’s ` provide() `
222+ method is called to obtain the history. After the history is obtained, the provider is cleared (set to null), and the
223+ component uses the history. State restoration occurs in the ` preInitialize() ` phase via the
224+ ` AbstractComponentViewModel#restoreHistory() ` method. State saving occurs in the ` postDeinitialize() ` phase via the
225+ ` AbstractComponentViewModel#saveHistory() ` method. The volume and type of state information that is restored and
226+ persisted are determined by the ` HistoryPolicy ` enum.
227+
219228### Component Lifecycle<a name =" component-lifecycle " ></a >
220229
221230Each component features ` Component#initialize() ` and ` Component#deinitialize() ` methods,
0 commit comments