{"id":21713893,"url":"https://github.com/cytle/mobx-weapp","last_synced_at":"2025-07-13T20:05:31.786Z","repository":{"id":23194495,"uuid":"92849649","full_name":"cytle/mobx-weapp","owner":"cytle","description":"weapp + react / mobx 示例,解放你的双手","archived":false,"fork":false,"pushed_at":"2025-02-20T08:03:03.000Z","size":1745,"stargazers_count":3,"open_issues_count":23,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T21:02:59.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cytle.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-30T15:49:23.000Z","updated_at":"2018-04-12T13:03:30.000Z","dependencies_parsed_at":"2024-08-28T07:53:55.471Z","dependency_job_id":"35e25869-bc6e-4979-b02e-8e6a4bf1d4b9","html_url":"https://github.com/cytle/mobx-weapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cytle/mobx-weapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmobx-weapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmobx-weapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmobx-weapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmobx-weapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cytle","download_url":"https://codeload.github.com/cytle/mobx-weapp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytle%2Fmobx-weapp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265198362,"owners_count":23726449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T00:28:28.775Z","updated_at":"2025-07-13T20:05:31.757Z","avatar_url":"https://github.com/cytle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mobx-weapp\n\n`weapp + react / mobx` 示例,解放你的双手\n\n## Usage\n\n```shell\nnpm install\n\nnpm run dev:react   # react 开发\nnpm run dev:weapp   # react 开发\n```\n\n打开http://localhost:7778/dist/index.html 或用小程序打开 `path/to/mobx-weapp/shells/weapp`\n\n### 如果需要看控制台信息\n\n```js\nlocalStorage.setItem('debug', 'React:*');\n```\n\n## 文档结构\n\n```\nshells\n├── alias.js\n├── react\n│   ├── index.html\n│   ├── src\n│   └── webpack.config.js\n└── weapp\n    ├── build\n    ├── gulpfile.js\n    ├── logic.js\n    ├── src\n    ├── webpack.config.js\n    └── webpack.dll.js\nsrc\n├── css\n│   ├── app.css\n│   └── todos.css\n├── store\n│   ├── index.js\n│   ├── timerView.js\n│   └── todos\n└── utils.js\n```\n\n## 小程序组件探索\n\n### 1. 使用createTransformer生成自动反应组件探索\n\n1. 优点\n    - 无状态组件分层，结构清晰\n    - 各组件自动响应，修改当前组件渲染数据\n    - 在满足第二点下，最少运行\n2. 缺点\n    - 优点3，需要保证组件入参为observable数据或是基本类型数据，不然百分百运行\n    - 需要遵循的规则较多\n    - 自动运行下，debug难度大\n    - 还未做到增量setData\n\n## tips\n\n- 全局的 onError 处理方法可以通过 extras.onReactionError(handler) 来设置\n\n\n## 截图\n\n![demo](https://raw.githubusercontent.com/cytle/mobx-weapp/a5acb7a38a257ac63c892532a8cdb48be4b70834/images/demo.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytle%2Fmobx-weapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcytle%2Fmobx-weapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytle%2Fmobx-weapp/lists"}