npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

dva-loading

3.0.2 • Public • Published

dva-loading

NPM version Build Status Coverage Status NPM downloads

Auto loading data binding plugin for dva. 👏 You don't need to write showLoading and hideLoading any more.


Install

$ npm install dva-loading --save

Usage

import createLoading from 'dva-loading';
 
const app = dva();
app.use(createLoading(opts));

Then we can access loading state from store.

opts

  • opts.namespace: property key on global state, type String, Default loading

See real project usage on dva-hackernews.

State Structure

loading: {
  global: false,
  models: {
    users: false,
    todos: false,
    ...
  },
}

License

MIT

install

npm i dva-loading

Downloadsweekly downloads

8,178

version

3.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability