blob: 5f738557f007ae4d7c168247b2fc5838051ee3d8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { action, computed, observable } from 'mobx';
import Store from './lib/Store';
import CachedRequest from './lib/CachedRequest';
import Request from './lib/Request';
export default class RecipesStore extends Store {
@observable defaultFeaturesRequest = new CachedRequest(this.api.features, 'defaults');
setup() {
return this.defaults;
}
@computed get defaults() {
console.log('GETTING DEFAULTS')
return this.defaultFeaturesRequest.execute().result || [];
}
}
|