dva-loading
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
; const app = ;app;
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.
State Structure
loading: {
global: false,
models: {
users: false,
todos: false,
...
},
}