mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Store called and moved to cosnt.
This commit is contained in:
+5
-2
@@ -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(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user