RootStore.ts 592 B

1234567891011121314151617181920
  1. import { types } from 'mobx-state-tree';
  2. import { NavStore } from './../NavStore/NavStore';
  3. import { ViewStore } from './../ViewStore/ViewStore';
  4. import { PermissionsStore } from './../PermissionsStore/PermissionsStore';
  5. export const RootStore = types.model({
  6. nav: types.optional(NavStore, {}),
  7. permissions: types.optional(PermissionsStore, {
  8. fetching: false,
  9. items: [],
  10. }),
  11. view: types.optional(ViewStore, {
  12. path: '',
  13. query: {},
  14. routeParams: {},
  15. }),
  16. });
  17. type RootStoreType = typeof RootStore.Type;
  18. export interface RootStoreInterface extends RootStoreType {}