summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/self_monitor/store/index.js
blob: a222e9c87b87a4d4a9a5e6f49ace9298269c28c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Vue from 'vue';
import Vuex from 'vuex';
import createState from './state';
import * as actions from './actions';
import mutations from './mutations';

Vue.use(Vuex);

export const createStore = initialState =>
  new Vuex.Store({
    modules: {
      selfMonitoring: {
        namespaced: true,
        state: createState(initialState),
        actions,
        mutations,
      },
    },
  });

export default createStore;