redva-loading
v1.1.3
Published
Auto loading plugin for redva.
Downloads
5
Maintainers
Readme
redva-loading
Auto loading plugin for redva. :clap: You don't need to write showLoading
and hideLoading
any more.
Install
$ npm install redva-loading --save
Usage
import createLoading from 'redva-loading';
const app = redva();
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.
State Structure
loading: {
global: false,
models: {
users: false,
todos: false,
...
},
}