{"id":15030165,"url":"https://github.com/sangka/react-in-patterns-cn","last_synced_at":"2025-05-16T12:11:56.062Z","repository":{"id":39421073,"uuid":"131375268","full_name":"SangKa/react-in-patterns-cn","owner":"SangKa","description":"React in patterns 中文版","archived":false,"fork":false,"pushed_at":"2018-08-10T04:10:46.000Z","size":152014,"stargazers_count":1229,"open_issues_count":1,"forks_count":125,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-04-09T10:03:52.317Z","etag":null,"topics":["chinese-simplified","chinese-translation","data-flow","dependency","injection","patterns","react"],"latest_commit_sha":null,"homepage":"https://sangka.github.io/react-in-patterns-cn","language":"JavaScript","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/SangKa.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}},"created_at":"2018-04-28T05:15:40.000Z","updated_at":"2025-04-01T14:13:35.000Z","dependencies_parsed_at":"2022-07-16T10:16:08.921Z","dependency_job_id":null,"html_url":"https://github.com/SangKa/react-in-patterns-cn","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SangKa%2Freact-in-patterns-cn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SangKa%2Freact-in-patterns-cn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SangKa%2Freact-in-patterns-cn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SangKa%2Freact-in-patterns-cn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SangKa","download_url":"https://codeload.github.com/SangKa/react-in-patterns-cn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018060,"owners_count":21034048,"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":["chinese-simplified","chinese-translation","data-flow","dependency","injection","patterns","react"],"created_at":"2024-09-24T20:12:38.254Z","updated_at":"2025-04-09T10:04:07.722Z","avatar_url":"https://github.com/SangKa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React 模式\n\n\u003e [React in patterns](https://github.com/krasimir/react-in-patterns) 中文版\n\n:book: 介绍 [React](https://facebook.github.io/react/) 开发的设计模式和技术的免费开源书籍。\n\n## 书\n\n* [在线](https://sangka.github.io/react-in-patterns-cn)\n* [PDF](https://github.com/SangKa/react-in-patterns-cn/raw/gh-pages/ebook/React模式.pdf)\n* [Mobi](https://github.com/SangKa/react-in-patterns-cn/raw/gh-pages/ebook/React模式.mobi)\n* [ePub](https://github.com/SangKa/react-in-patterns-cn/raw/gh-pages/ebook/React模式.epub)\n\n![React in patterns cover](./book/cover_small.jpg)\n\n## 目录\n\n* [简介](./book/chapter-1/README.md)\n\n### 基础\n\n* [组件通讯](./book/chapter-2/README.md)\n  * [输入](./book/chapter-2/README.md#输入)\n  * [输出](./book/chapter-2/README.md#输出)\n* [事件处理](./book/chapter-3/README.md)\n* [组合](./book/chapter-4/README.md)\n  * [使用 React children API](./book/chapter-4/README.md#使用-react-children-api)\n  * [将 child 作为 prop 传入](./book/chapter-4/README.md#将-child-作为-prop-传入)\n  * [高阶组件](./book/chapter-4/README.md#高阶组件)\n  * [将函数作为 children 传入和 render prop](./book/chapter-4/README.md#将函数作为-children-传入和-render-prop)\n* [受控输入和非受控输入](./book/chapter-5/README.md)\n* [展示型组件和容器型组件](./book/chapter-6/README.md) \n\n### 数据流\n\n* [单向数据流](./book/chapter-7/README.md)\n* [Flux](./book/chapter-8/README.md)\n  * [Flux 架构及其主要特点](./book/chapter-8/README.md#flux-架构及其主要特点)\n  * [实现 Flux 架构](./book/chapter-8/README.md#实现-flux-架构)\n* [Redux](./book/chapter-9/README.md)\n  * [Redux 架构及其主要特点](./book/chapter-9/README.md#redux-架构及其主要特点)\n  * [使用 Redux 的简单计数器应用](./book/chapter-9/README.md#使用-redux-的简单计数器应用)\n\n### 其他\n\n* [依赖注入](./book/chapter-10/README.md)\n  * [使用 React context (16.3 之前的版本)](./book/chapter-10/README.md#使用-react-context-163-之前的版本)\n  * [使用 React context (16.3 及之后的版本)](./book/chapter-10/README.md#使用-react-context-163-及之后的版本)\n  * [使用模块系统](./book/chapter-10/README.md#使用模块系统)\n* [组件样式](./book/chapter-11/README.md)\n  * [经典 CSS 类](./book/chapter-11/README.md#经典-css-类)\n  * [内联样式](./book/chapter-11/README.md#内联样式)\n  * [CSS 模块](./book/chapter-11/README.md#css-模块)\n  * [Styled-components](./book/chapter-11/README.md#styled-components)\n* [集成第三方库](./book/chapter-12/README.md)\n\n## 源码\n\n书中所使用的代码全部在 [这里](./code) 。\n\n## 其他资源\n\n* [React 设计原则](https://facebook.github.io/react/contributing/design-principles.html)\n* [Airbnb React/JSX 风格指南](https://github.com/airbnb/javascript/tree/master/react)\n* [Planning Center Online 所使用的 React 模式](https://github.com/planningcenter/react-patterns)\n* [Michael Chan 所写的 React 模式](http://reactpatterns.com/)\n* [React 的模式、技术、小贴士和技巧](https://github.com/vasanthk/react-bits)\n\n## 构建本书\n\n`yarn install \u0026\u0026 yarn build`\n\n*要生成电子书，需要先安装 [calibre](http://calibre-ebook.com/about) ，然后执行 `ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin/` 。*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangka%2Freact-in-patterns-cn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangka%2Freact-in-patterns-cn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangka%2Freact-in-patterns-cn/lists"}