@async-resource/vuex
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@async-resource/redux

Installation

npm install --save @async-resource/vuex

Usage

import connectResource from '@async-resource/vuex'

// create store
const store = new Store({})
const { registerResource } = connectResource(store)

// register resources dynamically
registerResource('user', {
  source: () => axios.get('/rest/user-info'),
})

// interact with vuex
await store.dispatch('userResource/consume')

Package Sidebar

Install

npm i @async-resource/vuex

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

6.66 kB

Total Files

13

Last publish

Collaborators

  • cristovao-trevisan