import { createContext } from 'react' ; import { configure } from 'mobx' ; import API from './modules/API' ; import Settings from './modules/Settings' ; import Translation from './modules/Translation' ; configure ( { enforceActions : 'always' , computedRequiresReaction : true , reactionRequiresObservable : true , observableRequiresReaction : true , } ) ; /**
 * combined root store
 */ export class Store { api = new API ( this ) ; settings = new Settings ( this ) ; translation = new Translation ( this ) ; } export const store = new Store ( ) ; export const StoreContext = createContext ( store ) ;