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

3.0.23 • 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-ts

Weekly Downloads

6

Version

3.0.23

License

MIT

Unpacked Size

13 kB

Total Files

9

Last publish

Collaborators

  • superchenwb