explaingit

dvajs/dva

Analysis updated 2026-06-24

16,172JavaScriptAudience · developerComplexity · 3/5Setup · easy

TLDR

Dva is a lightweight JavaScript front-end framework that wraps Redux and redux-saga with a small 6-API surface and Elm-style models bundling state, reducers, and effects.

Mindmap

mindmap
  root((dva))
    Inputs
      Models
      Actions
    Outputs
      Rendered UI
      State updates
    Use Cases
      Build a React SPA
      Avoid Redux boilerplate
      Manage async data
    Tech Stack
      JavaScript
      React
      Redux
      redux-saga
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a React single-page app with less Redux boilerplate

USE CASE 2

Organize features as self-contained dva models with state and effects

USE CASE 3

Use Hot Module Replacement to iterate on a React app during development

USE CASE 4

Migrate an existing Redux project to dva-style models

What is it built with?

JavaScriptReactReduxredux-saga

How does it compare?

dvajs/dvafaressoft/terminalizeryabwe/medium-editor
Stars16,17216,12316,109
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Maintenance status is low, Redux Toolkit is the more current alternative for new projects.

License terms are not stated in the provided summary, verify the LICENSE file before commercial use.

In plain English

Dva is a lightweight JavaScript framework for building web application front-ends. It sits on top of Redux (a popular tool for managing app-wide data and state) and redux-saga (a library for handling things like API calls and other side effects), and wraps them in a simpler, more organized API. Instead of writing a lot of Redux boilerplate, the repetitive setup code that Redux normally requires, dva lets you define your app's logic in compact "models" that bundle together the state, the functions that update it, and side effects like data fetching. The framework is inspired by Elm, a functional programming language with a strict data-flow architecture, and applies that pattern to JavaScript apps. Each model in dva has three parts: reducers (pure functions that update state), effects (async logic, like fetching data from a server), and subscriptions (listeners that react to events like URL changes). The idea is that instead of scattering these pieces across many files, you keep them together in one place per feature. Dva claims to have only six core APIs to learn, making it quicker to pick up than raw Redux. It supports Hot Module Replacement, which means your browser automatically updates when you save a file during development without losing your app's current state. A plugin system allows optional add-ons, such as automatic loading state management. The README notes that over 1,000 projects use it at Alibaba. It is written in JavaScript and published as an open-source package.

Copy-paste prompts

Prompt 1
Convert this Redux reducer and saga pair into a single dva model
Prompt 2
Set up a new React project with dva and one example model for users
Prompt 3
Explain how dva subscriptions react to URL changes in a typical app
Prompt 4
Add the dva loading plugin and show a spinner during an async effect
Prompt 5
Compare dva to Redux Toolkit for a new React project in 2026

Frequently asked questions

What is dva?

Dva is a lightweight JavaScript front-end framework that wraps Redux and redux-saga with a small 6-API surface and Elm-style models bundling state, reducers, and effects.

What language is dva written in?

Mainly JavaScript. The stack also includes JavaScript, React, Redux.

What license does dva use?

License terms are not stated in the provided summary, verify the LICENSE file before commercial use.

How hard is dva to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is dva for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub dvajs on gitmyhub

Verify against the repo before relying on details.