kingsoft-dva-loading
v0.0.1
Published
kingsoft patch/fork version for dva-loading which is an auto loading plugin.
Downloads
2
Readme
dva-loading
Auto loading plugin for dva. :clap: 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, Defaultloading
See real project usage on dva-hackernews.
opts.effects
: enable effects level loading state
State Structure
loading: {
global: false,
models: {
users: false,
todos: false,
...
},
}