1 2 3 4 5 6 7 8 9 10 11 12 13 14
import { observable } from 'mobx'; const defaultState = { name: null, isFeatureActive: false, }; export const exampleFeatureState = observable(defaultState); export function resetState() { Object.assign(exampleFeatureState, defaultState); } export default exampleFeatureState;