# vanex **Repository Path**: alibaba/vanex ## Basic Information - **Project Name**: vanex - **Description**: Frontend development library based on mobx. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-31 - **Last Updated**: 2025-12-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vanex [](https://www.npmjs.com/package/vanex) [](https://npmjs.org/package/vanex) [github](https://github.com/alibaba/vanex) Vanex 是基于 mobx 的 React 数据流管理框架,旨在借助 mobx 提供的基础能力,帮助用户组织更大规模的 React 项目。 # 文档 [https://alibaba.github.io/vanex/](https://alibaba.github.io/vanex/) # Quick Start Vanex 提供两个简洁的 API:@vanex 和 start ```js import React from 'react'; import { vanex, start } from 'vanex'; import axios from 'axios'; const model = { name: 'my', // 数据部分 data: { name: 'abc' }, // 异步请求部分 effects: { async getName(arg) { try { const res = await axios.get(`/user?ID=${arg}`); if(res.success && res.data) { // set方法会自动触发UI渲染 this.set({ name: res.data.name }); } } catch(e) { alert(e.message); } } }, }; @vanex('my') class Comp extends React.Component{ constructor() { super(...arguments); } componentWillMount() { // 异步请求数据 this.my.getName('test'); } render() { const { name } = this.my.toJS(); return (