state-only

vuenit.store({
  loading : false,
  users : {
    users : [],
    userId : 1
  },
  nestedModules : {
    moduleA : {
      foo : 'bah'
    }
  }
});

This will create a store with a state property that matches the above definition:

store.state.loading // false
store.state.users.users // []
store.state.nestedModules.moduleA.foo // 'bah'

It will also create a module for each nested object. This means the above store would have the following modules:

  • users
  • nestedModules
  • nestedModules/moduleA

results matching ""

    No results matching ""