mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
- replacing mobx.toJS()-calls to common/utils/toJS
- adding missing makeObservable(this) - fix docs Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
575becfdaa
commit
3323c25be3
28 files changed
+108
-91
No files matched your search
@@ -25,7 +25,7 @@ The following example code creates a store for the `appPreferences` guide exampl
|
||||
|
||||
``` typescript
|
||||
import { Store } from "@k8slens/extensions";
|
||||
import { observable, toJS } from "mobx";
|
||||
import { observable, toJS, makeObservable } from "mobx";
|
||||
|
||||
export type ExamplePreferencesModel = {
|
||||
enabled: boolean;
|
||||
@@ -42,6 +42,7 @@ export class ExamplePreferencesStore extends Store.ExtensionStore<ExamplePrefere
|
||||
enabled: false
|
||||
}
|
||||
});
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
protected fromStore({ enabled }: ExamplePreferencesModel): void {
|
||||
|
||||
Reference in new issue
Block a user