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