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
1. Make your own `ViewModelStore` implementation with accepting `RootStore` as `constructor` parameter and overriding `createViewModel` method for transfer `rootStore`
51
+
1. Make your own `ViewModelStore` implementation
56
52
57
-
```ts{8,11,22,23,24}
53
+
```ts{8,19,20,21}
58
54
// view-model.store.impl.ts
59
55
import {
60
56
ViewModelParams,
@@ -65,10 +61,6 @@ import {
65
61
import { ViewModelImpl } from "./view-model.impl.ts"
66
62
67
63
export class ViewModelStoreImpl extends ViewModelStoreBase {
1. Make your own `ViewModelStore` implementation with accepting `RootStore` as `constructor` parameter and overriding `createViewModel` method for transfer `rootStore`
53
+
54
+
```ts{8,9,12,23,24,25}
55
+
// view-model.store.impl.ts
56
+
import {
57
+
ViewModelParams,
58
+
ViewModelStoreBase,
59
+
ViewModel,
60
+
ViewModelCreateConfig,
61
+
} from 'mobx-view-model';
62
+
import { ViewModelImpl } from "./view-model.impl.ts"
63
+
import { RootStore } from "@/shared/store";
64
+
65
+
export class ViewModelStoreImpl extends ViewModelStoreBase {
0 commit comments