Store called and moved to cosnt.

This commit is contained in:
Giedrius Grabauskas
2015-11-25 03:00:46 +02:00
parent 3f99edd466
commit 01f5b8f246
+5 -2
View File
@@ -107,15 +107,18 @@ class CounterStore extends FluxUtils.ReduceStore<number> {
}
}
var Disaptcher: any;
const Store = new CounterStore(Dispatcher);
// Sample Flux container with CounterStore
class CounterContainer extends Component<any, any> {
static getStores() {
return [CounterStore];
return [Store];
}
static calculateState(prevState: any) {
return {
counter: CounterStore.getState(),
counter: Store.getState(),
};
}