轻量级JS框架 dva
- 授权协议: MIT
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/dvajs/dva
- 软件文档: https://github.com/dvajs/dva#getting-started
软件介绍
基于React和Redux的树型结构轻量级JS框架,(灵感来自Choo).
特点:
基于 redux, redux-saga and react-router: 站在巨人的肩膀上。
small api: 仅5个api方法,很容易学习。
elm cocepts: 基于reducers,effects和subscriptions的组织模型。
支持mobile and react-native: 跨开台
动态 model and router: 拆分大型应用程序和负载的需求
plugin system: 可扩展dva
hmr support with babel-plugin-dva-hmr
简单使用方法:
import dva, { connect } from 'dva';
// 1. Create app
const app = dva();
// 2. Add plugins (optionally)
app.use(plugin);
// 3. Register models
app.model(model);
// 4. Connect components and models
const App = connect(mapStateToProps)(Component);
// 5. Config router with Components
app.router(routes);
// 6. Start app
app.start('#root');
