
dva
A lightweight React and Redux framework that organizes app state in an Elm-like style.
- Stars
- 16.1k
- Forks
- 3.1k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 1.3 years ago
- Type
- Library
No commits in over a year — check for forks or alternatives before adopting.
What it is
dva is a front-end framework built on top of redux, redux-saga, and react-router. It groups app logic into models that contain reducers, effects, and subscriptions, which is meant to make state handling in React apps simpler. The README says it is inspired by Elm and choo.
- Structure a multi-page dashboard with models for users, orders, and similar data
- Handle async calls such as API requests through effects that use redux-saga
- Show loading indicators automatically with the dva-loading plugin
- Use the dva-hackernews or user-dashboard examples as starting references
Great for
- React developers already familiar with Redux who want less boilerplate
- Teams maintaining admin dashboards or enterprise-style web apps
- Developers who want built-in hot module replacement for components, routes, and models
- Projects that want a plugin system, such as the dva-loading plugin for loading states
Not ideal for
- Beginners who are new to React and Redux, since the concepts stack up quickly
- Projects that need to support IE8, which the README explicitly says is not supported
- Developers starting a new project who want a framework with current, active documentation, since the README points to a docs directory and older blog posts rather than a detailed guide
How to get it
- 1
Install with a package manager
You'll need: Node.js · npm or yarn
Install dva from npm
npm install dva - 2
Run it
- Install the dva package from npm
- Read the Concepts guide in the docs directory to understand models, reducers, effects, and subscriptions
- Create a model and register it with your app
- Start from the Count demo on StackBlitz to see a working example
- 3
Get the most out of it
- Read the 8 Concepts document to see how the parts connect
- Use babel-plugin-dva-hmr for hot reloading of models and routes
- Add the dva-loading plugin to track loading state without writing it by hand
- Look at the User Dashboard example in the repository for a fuller app structure
Downloads
Strengths
- The README describes only six APIs, which keeps the surface area small for Redux users
- Models separate reducers, effects, and subscriptions in a clear, Elm-inspired way
- Includes HMR support for components, routes, and models, and a plugin system
Trade-offs
- The README's Quick Start only links to a docs directory, so setup detail is limited in the README itself
- The README notes the project was built around Alibaba's internal use, and the Redux/saga stack adds concepts to learn
- Last push date is 2025-08-06, but the README does not state the current maintenance status or supported React versions
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| dva (this) | 16.1k | Library | intermediate | 1.3 years ago | React developers already familiar with Redux who want less boilerplate |
| redux-toolkit | 11.2k | Library | intermediate | 4 days ago | Developers already using or learning Redux for app state |
| zustand | 58.9k | Library | beginner | 16 days ago | React developers who want simpler shared state than Redux |
| mobx | 28.2k | Library | intermediate | 5 days ago | Frontend developers building React apps with complex or frequently changing state |
| Recoil | 19.4k | Library | intermediate | 1.8 years ago | React developers who want shared state beyond simple prop passing |
| redux-saga | 22.4k | Library | intermediate | 12 days ago | React or other frontend developers already using Redux who need to manage async logic |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.