dva-loading
TypeScript icon, indicating that this package has built-in type declarations

3.0.24 • 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

Readme

Keywords

Package Sidebar

Install

npm i dva-loading

Weekly Downloads

15,930

Version

3.0.24

License

MIT

Unpacked Size

13.3 kB

Total Files

5

Last publish

Collaborators

  • sorrycc