aboutsummaryrefslogtreecommitdiffstats
path: root/docs/example-feature/state.js
blob: 676717da798a0e8bc1aba9abfc9656094ac8a875 (plain) (blame)
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;