Skip to content
Branch: master
Find file History
sorrycc chore: bundle with umi-library (#2015)
* chore: bundle with umi-library

* chore: remove unused files

* extract dva-no-router and dva-react-router-3 outside

* bundle dva with umi-library

* export fetch in index.js

* set runtimeHelpers to extra helper methods to @babel/runtime

* add umi-library dep

* ci with yarn

* fix ci

* update

* update README.md

* code style

* use exact dependency
Latest commit d1f0b11 Mar 7, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src chore: bundle with umi-library (#2015) Mar 7, 2019
test
.umirc.library.js chore: bundle with umi-library (#2015) Mar 7, 2019
README.md
package.json chore: bundle with umi-library (#2015) Mar 7, 2019
yarn.lock chore: bundle with umi-library (#2015) Mar 7, 2019

README.md

dva-loading

NPM version Build Status Coverage Status NPM downloads

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

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, Default loading

See real project usage on dva-hackernews.

State Structure

loading: {
  global: false,
  models: {
    users: false,
    todos: false,
    ...
  },
}

License

MIT

You can’t perform that action at this time.