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
Copy file name to clipboardExpand all lines: docs/api/other/view-model-lookup.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ It can be:
8
8
-`ViewModel class reference`
9
9
-[`React`](https://react.dev) component created with [`withViewModel()`](/react/api/with-view-model) or [`withLazyViewModel()`](/react/api/with-lazy-view-model)
10
10
11
-
[Reference to source code type](/src/view-model/view-model.store.types.ts#L35)
12
-
[Reference to source code with internal usage of this value](/src/view-model/view-model.store.base.ts#L149)
11
+
[Reference to source code type](/src/view-model/view-model.store.types.ts#L42)
12
+
[Reference to source code with internal usage of this value](/src/view-model/view-model.store.base.ts#L220)
Copy file name to clipboardExpand all lines: docs/api/view-model-store/interface.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,11 @@ title: View Model Store interface
6
6
7
7
Interface represeting a store for managing [`ViewModels`](/api/view-models/interface)
8
8
9
-
::: tip
10
-
Not required entity for targeted usage of this package, but can be helpful for accessing [ViewModel](/api/view-models/overview)s from everywhere by [ViewModel](/api/view-models/overview) id or [ViewModel](/api/view-models/overview) class name.
9
+
::: tip OPTIONAL USE
10
+
This is not required for targeted usage of this package, but can be helpful for accessing [ViewModels](/api/view-models/overview) from everywhere by [ViewModelLookup](api/other/view-model-lookup)
11
11
:::
12
12
13
+
[Reference to source code](/src/view-model/view-model.store.ts)
Copy file name to clipboardExpand all lines: docs/api/view-models/view-model-simple.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
-
# ViewModelSimple
1
+
# `ViewModelSimple`
2
2
3
3
`ViewModelSimple` is a minimalistic implementation of the [ViewModel interface](/api/view-models/interface), designed for lightweight state management with **MobX**. It simplifies reactive state initialization using `makeAutoObservable` while enforcing a consistent instance lifecycle in React applications.
4
4
5
+
[Reference to source code](/src/view-model/view-model-simple.ts)
6
+
5
7
## When to Use
6
8
Use `ViewModelSimple` when:
7
9
1. You need `direct control over MobX observability` (e.g., using `makeAutoObservable`)
@@ -43,7 +45,7 @@ export class FruitViewModel implements ViewModelSimple {
43
45
44
46
### Instance creation
45
47
46
-
**Recommend** (but not required) to create instances using the [`useCreateViewModel`](/react/api/use-create-view-model) hook. This ensures proper lifecycle management and reactivity:
48
+
Create instances using the [`useCreateViewModel`](/react/api/use-create-view-model) hook. This ensures proper lifecycle management and reactivity:
0 commit comments