Denna sida fungerar bättre med Javascript igång.
Startsida
Utforska
lain.church
Hjälp
Registrera dig
Logga in
lunarised
/
ReactLearning
Bevaka
1
Stjärnmärk
0
Förgrening
0
Kod
Ärenden
0
Pull-förfrågningar
0
Släpp
0
Wiki
Aktiviteter
Bläddra i källkod
Weird mob X
master
James McKenzie
3 år sedan
förälder
44c66dd781
incheckning
ac49492e17
3 ändrade filer
med
31 tillägg
och
0 borttagningar
Delad Vy
Diff Options
Show Stats
Download Patch File
Download Diff File
+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
Visa fil
@@ -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
Visa fil
@@ -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
Visa fil
@@ -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);
}
}
Write
Förhandsgranska
Laddar…
Avbryt
Spara