このサイトはJavaScriptを使用しています
ホーム
エクスプローラー
lain.church
ヘルプ
登録
サインイン
lunarised
/
ReactLearning
ウォッチ
1
スター
0
フォーク
0
コード
課題
0
プルリクエスト
0
リリース
0
Wiki
アクティビティ
ソースを参照
Weird mob X
master
James McKenzie
3年前
親
44c66dd781
コミット
ac49492e17
3個のファイルの変更
、
31行の追加
、
0行の削除
分割表示
差分オプション
統計情報を表示
Patchファイルをダウンロード
Diffファイルをダウンロード
+7
-0
MobXLearning/mobx_course/src/stores/data/data-store.ts
+13
-0
MobXLearning/mobx_course/src/stores/data/todo-store.ts
+11
-0
MobXLearning/mobx_course/src/stores/root-store.ts
+ 7
- 0
MobXLearning/mobx_course/src/stores/data/data-store.ts
ファイルの表示
@@ -0,0 +1,7 @@
export default class DataStore{
todoStore: TodoStore;
constructor(rootStore: RootStore){
this.todoStore = new TodoStore(rootStore)
}
}
+ 13
- 0
MobXLearning/mobx_course/src/stores/data/todo-store.ts
ファイルの表示
@@ -0,0 +1,13 @@
import { observable } from "mobx";
class Todo{}
export default class TodoStore {
@observable
list: Todo[];
private rootStore: RootStore;
constructor(rootStore: RootStore){
this.rootStore = rootStore;
}
}
+ 11
- 0
MobXLearning/mobx_course/src/stores/root-store.ts
ファイルの表示
@@ -0,0 +1,11 @@
import DataStore from "./data/data-store";
class RootStore{
dataStore: DataStore;
uiStore: UiStore;
constructor(){
this.dataStore = new DataStore(this);
this.uiStore = new UiStore(this);
}
}
書き込み
プレビュー
読み込み中…
キャンセル
保存