1 2 3 4 5 6 7 8 9 10 11 12 13
import { observable } from 'mobx'; const defaultState = { isLoading: false, workspaces: [], workspaceBeingEdited: null, }; export const state = observable(defaultState); export function resetState() { Object.assign(state, defaultState); }