dva
dva is a lightweight React and Redux application framework that wraps redux, redux-saga, and react-router behind a minimal API. It organizes state into Elm-inspired models composed of reducers, effects, and subscriptions, reducing the boilerplate of the traditional Redux ecosystem.
MITPermissive — free to use in commercial and proprietary software, with attribution.View license →
Production readiness
3/5- Actively maintainedSlower activity (6–12 months)
- No known vulnerabilitiesNot yet scanned
- Clear, usable licenseMIT (permissive)
- Proven adoptionWidely used
- Has documentationDocumentation indexed
npm install dvaOur analysis
dva is a data-flow framework for React that bundles redux, redux-saga, and react-router under a small unified API, structuring application state as Elm-style models with reducers, effects, and subscriptions.
When to use dva
Good for React apps that want the predictability of Redux and the async power of redux-saga without manually wiring all the pieces, especially in the umi ecosystem where its API surface effectively drops to near zero. Helpful for teams already familiar with Redux who want less boilerplate and an opinionated model structure.
When not to
Skip it for small apps where lightweight stores like Zustand or Context suffice, for new projects where Redux Toolkit is the more actively maintained, mainstream choice, or for non-React stacks. Its heavy reliance on redux-saga/generators is overkill if your async needs are simple.
Strengths
- Very small API (~6 methods) layered over Redux, react-router, and redux-saga
- Elm-inspired model organization keeps reducers, effects, and subscriptions co-located
- Plugin system (e.g. dva-loading) automates common concerns like loading state
- Mature, battle-tested in Alibaba's ecosystem and tightly integrated with umi
Trade-offs
- Locks you into redux-saga and generator-based effects, a heavier paradigm than modern alternatives
- Momentum has shifted toward umi's built-in data flow and Redux Toolkit; standalone dva is less actively evolved
- Documentation is largely Chinese-first, raising the barrier for international teams
- Adds an abstraction layer that can obscure underlying Redux behavior when debugging
Maturity
Widely adopted (16k+ stars) and production-proven within the umi/Ant Design ecosystem, but development has slowed as the community gravitates toward umi's integrated data management and Redux Toolkit. It remains stable rather than rapidly advancing.
home: true actionText: 快速上手 → actionLink: /guide/ features:
title: 易学易用 details: 仅有 6 个 api,对 redux 用户尤其友好,配合 umi 使用后更是降低为 0 API
title: elm 概念 details: 通过 reducers, effects 和 subscriptions 组织 model,简化 redux 和 redux-saga 引入的概念
title: 插件机制 details: 比如 dva-loading 可以自动处理 loading 状态,不用一遍遍地写 showLoading 和 hideLoading footer: MIT Licensed | Copyright © 2017-present
社区
Slack GroupGithub Issue钉钉群微信群sorrycc.slack.comumijs/umi/issueshttps://t.me/joinchat/G0DdHw9tDZC-_NmdKY2jYg