{"id":17677444,"url":"https://github.com/unadlib/iflow-docs-cn","last_synced_at":"2026-02-06T15:04:45.951Z","repository":{"id":86376689,"uuid":"117287629","full_name":"unadlib/iflow-docs-cn","owner":"unadlib","description":"The Chinese version of iFlow documents.","archived":false,"fork":false,"pushed_at":"2018-01-30T01:57:14.000Z","size":836,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-06T20:52:49.373Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://cn.iflow.js.org","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unadlib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-01-12T21:01:43.000Z","updated_at":"2018-01-18T00:47:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"7de811d2-38da-4f0a-b257-de700acc5049","html_url":"https://github.com/unadlib/iflow-docs-cn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unadlib/iflow-docs-cn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unadlib%2Fiflow-docs-cn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unadlib%2Fiflow-docs-cn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unadlib%2Fiflow-docs-cn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unadlib%2Fiflow-docs-cn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unadlib","download_url":"https://codeload.github.com/unadlib/iflow-docs-cn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unadlib%2Fiflow-docs-cn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29165745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T14:37:12.680Z","status":"ssl_error","status_checked_at":"2026-02-06T14:36:22.973Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10-24T07:28:42.479Z","updated_at":"2026-02-06T15:04:45.934Z","avatar_url":"https://github.com/unadlib.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href='http://cn.iflow.js.org'\u003e\u003cimg src='https://raw.githubusercontent.com/unadlib/iflow/master/assets/logo.png' height='60' alt='iFlow Logo' aria-label='cn.iflow.js.org' /\u003e\u003c/a\u003e\n\niFlow是一个简洁和强大的状态管理库，iFlow没有任何依赖包，且非常小(5k)。\n\n[![Travis](https://img.shields.io/travis/unadlib/iflow.svg)](https://travis-ci.org/unadlib/iflow)\n[![Coverage Status](https://coveralls.io/repos/github/unadlib/iflow/badge.svg?branch=master)](https://coveralls.io/github/unadlib/iflow?branch=master)\n[![npm](https://img.shields.io/npm/v/iflow.svg)](https://www.npmjs.com/package/iflow)\n[![Join the chat at https://gitter.im/unadlib/iflow](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/unadlib/iflow?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\u003e[从0开始5分钟完成TODO](http://cn.iflow.js.org/#%E4%BB%8E0%E5%BC%80%E5%A7%8B%E4%BA%94%E5%88%86%E9%92%9F%E5%AE%8C%E6%88%90todo)\n\n### 特性\n* **🎯支持普通function和class** - 它很简单，同时也可设计符合各种需求状态管理架构。\n* **🏬Store组合** - Store Tree可以很容易共享操作Store节点。\n* **⚡动态和热插拔** - 可自由插拔State和Action。\n* **💥支持异步function以及其他类型的function** - 可任意组合Action或由内部其他内部Action相互组合。\n* **🚀强大的中间件** - 中间件可以处理State几乎任何事件。\n* **🔥Store支持immutable** - Store是支持被处理成immutable的Store。\n\n它是动态的和可扩展的, 你可以直接使用它来添加、删除和修改State和Action。它是 **Mutable** 结构, 支持普通function和class, 并且易于面向对象编程。如果使用React, 则需要使用 [react-iflow](https://github/unadlib/react-iflow)连接器。\n\n接下来我们会介绍以下几个方面的情况，让你对iFlow有深入的了解。\n\n* [概念与原则](/docs/introduction/ConceptsPrinciples.md)\n* [优点](/docs/introduction/Benefits.md)\n* [例子: Counter](/docs/introduction/Examples.md) \n\n### 从0开始五分钟完成TODO\n\n1.首先我们先完成快速一个TODO项目配置和基本npm包依赖\n\n```bash\nmkdir example \u0026\u0026 cd example\nyarn init -y\nyarn add -D parcel-bundler babel-cli babel-preset-react babel-preset-env\nyarn add react react-dom iflow react-iflow\n```\n\n2.然后我们完成一个babel配置文件和App入口文件index.html\n\n```bash\necho '{\"presets\": [\"env\",\"react\"]}' \u003e .babelrc\necho '\u003cdiv id=\"app\"\u003e\u003c/div\u003e\u003cscript src=\"./index.js\"\u003e\u003c/script\u003e' \u003e index.html\n```\n\n3.接着我们完成一个简单的TODO\n\n```bash\ncat \u003c\u003cEOF \u003e index.js\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport iFlow from 'iflow'\nimport flow from 'react-iflow'\n\nconst store = iFlow({\n    todo: [],\n    add(text){this.todo.push({text})},\n    toggle(item){item.completed = !item.completed}\n}).create()\n\nconst App = flow(store)(class extends React.Component {\n    render() {\n        const {todo,add,toggle} = this.props.store\n        return (\n            \u003cdiv\u003e\n                \u003cinput ref={(ref)=\u003ethis.input=ref}/\u003e\n                \u003cbutton onClick={()=\u003e{add(this.input.value);this.input.value=''}}\u003eAdd\u003c/button\u003e\n                \u003cul\u003e\n                    {todo.map((item,key)=\u003e(\u003cli key={key} style={item.completed?{textDecoration:'line-through'}:{}} onClick={()=\u003etoggle(item)}\u003e{item.text}\u003c/li\u003e))}\n                \u003c/ul\u003e \n            \u003c/div\u003e\n        )\n    }\n})\n\nReactDOM.render(\u003cApp/\u003e,document.getElementById('app'))\nEOF\n```\n\n4.最后我们运行起来, 嘿嘿!🎉🎉🎉\n\n```bash\nnpx parcel index.html\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funadlib%2Fiflow-docs-cn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funadlib%2Fiflow-docs-cn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funadlib%2Fiflow-docs-cn/lists"}