$ npm install dva-loading
Auto loading data binding plugin for dva. :clap: You don't need to write showLoading
and hideLoading
any more.
$ npm install dva-loading --save
import createLoading from 'dva-loading';
const app = dva();
app.use(createLoading(opts));
Then we can access loading state from store.
opts.namespace
: property key on global state, type String, Default loading
See real project usage on dva-hackernews.
loading: {
global: false,
models: {
users: false,
todos: false,
...
},
}
© 2010 - cnpmjs.org x YWFE | Home | YWFE