|
1 | | -# React in patterns |
| 1 | +# React 模式 |
2 | 2 |
|
3 | | -:books: A free book that talks about design patterns/techniques used while developing with [React](https://facebook.github.io/react/). |
| 3 | +> [React in patterns](https://github.com/krasimir/react-in-patterns) 中文版 |
4 | 4 |
|
5 | | -## Book |
| 5 | +:book: 介绍 [React](https://facebook.github.io/react/) 开发的设计模式和技术的免费开源书籍。 |
6 | 6 |
|
7 | | -* [GitBook](https://www.gitbook.com/book/krasimir/react-in-patterns/details) |
8 | | -* [Web](https://krasimir.gitbooks.io/react-in-patterns/content/) |
9 | | -* [PDF](https://www.gitbook.com/download/pdf/book/krasimir/react-in-patterns) |
10 | | -* [Mobi](https://www.gitbook.com/download/mobi/book/krasimir/react-in-patterns) |
11 | | -* [ePub](https://www.gitbook.com/download/epub/book/krasimir/react-in-patterns) |
| 7 | +## 书 |
| 8 | + |
| 9 | +* [在线](https://sangka.github.io/react-in-patterns-cn) |
| 10 | +* [PDF](https://github.com/SangKa/react-in-patterns-cn/raw/gh-pages/ebook/React模式.pdf) |
| 11 | +* [Mobi](https://github.com/SangKa/react-in-patterns-cn/raw/gh-pages/ebook/React模式.mobi) |
| 12 | +* [ePub](https://github.com/SangKa/react-in-patterns-cn/raw/gh-pages/ebook/React模式.epub) |
12 | 13 |
|
13 | 14 |  |
14 | 15 |
|
15 | | -## Content |
| 16 | +## 目录 |
16 | 17 |
|
17 | | -* [In brief](./book/chapter-1/README.md) |
| 18 | +* [简介](./book/chapter-1/README.md) |
18 | 19 |
|
19 | | -### Foundation |
| 20 | +### 基础 |
20 | 21 |
|
21 | | -* [Communication](./book/chapter-2/README.md) |
22 | | - * [Input](./book/chapter-2/README.md#input) |
23 | | - * [Output](./book/chapter-2/README.md#output) |
24 | | -* [Event handlers](./book/chapter-3/README.md) |
25 | | -* [Composition](./book/chapter-4/README.md) |
26 | | - * [Using React's children API](./book/chapter-4/README.md#using-reacts-children-api) |
27 | | - * [Passing a child as a prop](./book/chapter-4/README.md#passing-a-child-as-a-prop) |
28 | | - * [Higher-order component](./book/chapter-4/README.md#higher-order-component) |
29 | | - * [Function as a children, render prop](./book/chapter-4/README.md#function-as-a-children-render-prop) |
30 | | -* [Controlled and uncontrolled inputs](./book/chapter-5/README.md) |
31 | | -* [Presentational and container components](./book/chapter-6/README.md) |
| 22 | +* [组件通讯](./book/chapter-2/README.md) |
| 23 | + * [输入](./book/chapter-2/README.md#输入) |
| 24 | + * [输出](./book/chapter-2/README.md#输出) |
| 25 | +* [事件处理](./book/chapter-3/README.md) |
| 26 | +* [组合](./book/chapter-4/README.md) |
| 27 | + * [使用 React children API](./book/chapter-4/README.md#使用-react-children-api) |
| 28 | + * [将 child 作为 prop 传入](./book/chapter-4/README.md#将-child-作为-prop-传入) |
| 29 | + * [高阶组件](./book/chapter-4/README.md#高阶组件) |
| 30 | + * [将函数作为 children 传入和 render prop](./book/chapter-4/README.md#将函数作为-children-传入和-render-prop) |
| 31 | +* [受控输入和非受控输入](./book/chapter-5/README.md) |
| 32 | +* [展示型组件和容器型组件](./book/chapter-6/README.md) |
32 | 33 |
|
33 | | -### Data flow |
| 34 | +### 数据流 |
34 | 35 |
|
35 | | -* [One direction data flow](./book/chapter-7/README.md) |
| 36 | +* [单向数据流](./book/chapter-7/README.md) |
36 | 37 | * [Flux](./book/chapter-8/README.md) |
37 | | - * [Flux architecture and its main characteristics](./book/chapter-8/README.md#flux-architecture-and-its-main-characteristics) |
38 | | - * [Implementing a Flux architecture](./book/chapter-8/README.md#implementing-a-flux-architecture) |
| 38 | + * [Flux 架构及其主要特点](./book/chapter-8/README.md#flux-架构及其主要特点) |
| 39 | + * [实现 Flux 架构](./book/chapter-8/README.md#实现-flux-架构) |
39 | 40 | * [Redux](./book/chapter-9/README.md) |
40 | | - * [Redux architecture and its main characteristics](./book/chapter-9/README.md#redux-architecture-and-its-main-characteristics) |
41 | | - * [Simple counter app using Redux](./book/chapter-9/README.md#simple-counter-app-using-redux) |
42 | | - |
43 | | -### MISC |
44 | | - |
45 | | -* [Dependency injection](./book/chapter-10/README.md) |
46 | | - * [Using React's context (prior v. 16.3)](./book/chapter-10/README.md#using-reacts-context-prior-v-163) |
47 | | - * [Using React's context (v. 16.3 and above)](./book/chapter-10/README.md#using-reacts-context-v-163-and-above) |
48 | | - * [Using the module system](./book/chapter-10/README.md#using-the-module-system) |
49 | | -* [Styling](./book/chapter-11/README.md) |
50 | | - * [The good old CSS class](./book/chapter-11/README.md#the-good-old-css-class) |
51 | | - * [Inline styling](./book/chapter-11/README.md#inline-styling) |
52 | | - * [CSS modules](./book/chapter-11/README.md#css-modules) |
| 41 | + * [Redux 架构及其主要特点](./book/chapter-9/README.md#redux-架构及其主要特点) |
| 42 | + * [使用 Redux 的简单计数器应用](./book/chapter-9/README.md#使用-redux-的简单计数器应用) |
| 43 | + |
| 44 | +### 其他 |
| 45 | + |
| 46 | +* [依赖注入](./book/chapter-10/README.md) |
| 47 | + * [使用 React context (16.3 之前的版本)](./book/chapter-10/README.md#使用-react-context-163-之前的版本) |
| 48 | + * [使用 React context (16.3 及之后的版本)](./book/chapter-10/README.md#使用-react-context-163-及之后的版本) |
| 49 | + * [使用模块系统](./book/chapter-10/README.md#使用模块系统) |
| 50 | +* [组件样式](./book/chapter-11/README.md) |
| 51 | + * [经典 CSS 类](./book/chapter-11/README.md#经典-css-类) |
| 52 | + * [内联样式](./book/chapter-11/README.md#内联样式) |
| 53 | + * [CSS 模块](./book/chapter-11/README.md#css-模块) |
53 | 54 | * [Styled-components](./book/chapter-11/README.md#styled-components) |
54 | | -* [Integration of third-party libraries](./book/chapter-12/README.md) |
55 | | - |
| 55 | +* [集成第三方库](./book/chapter-12/README.md) |
56 | 56 |
|
57 | | -## Source code |
| 57 | +## 源码 |
58 | 58 |
|
59 | | -The code samples used in the book are available [here](./code). |
| 59 | +书中所使用的代码全部在 [这里](./code) 。 |
60 | 60 |
|
61 | | -## Other resources |
| 61 | +## 其他资源 |
62 | 62 |
|
63 | | -* [React Design principles](https://facebook.github.io/react/contributing/design-principles.html) |
64 | | -* [Airbnb React/JSX Style Guide](https://github.com/airbnb/javascript/tree/master/react) |
65 | | -* [React patterns at Planning Center Online](https://github.com/planningcenter/react-patterns) |
66 | | -* [React patterns by Michael Chan](http://reactpatterns.com/) |
67 | | -* [React patterns, techniques, tips and tricks](https://github.com/vasanthk/react-bits) |
| 63 | +* [React 设计原则](https://facebook.github.io/react/contributing/design-principles.html) |
| 64 | +* [Airbnb React/JSX 风格指南](https://github.com/airbnb/javascript/tree/master/react) |
| 65 | +* [Planning Center Online 所使用的 React 模式](https://github.com/planningcenter/react-patterns) |
| 66 | +* [Michael Chan 所写的 React 模式](http://reactpatterns.com/) |
| 67 | +* [React 的模式、技术、小贴士和技巧](https://github.com/vasanthk/react-bits) |
68 | 68 |
|
69 | | -## Building the book |
| 69 | +## 构建本书 |
70 | 70 |
|
71 | 71 | `yarn install && yarn build` |
72 | 72 |
|
73 | | -*To make the ebook generating possible install [calibre](http://calibre-ebook.com/about) and `ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin/`.* |
| 73 | +*要生成电子书,需要先安装 [calibre](http://calibre-ebook.com/about) ,然后执行 `ln -s /Applications/calibre.app/Contents/MacOS/ebook-convert /usr/local/bin/` 。* |
0 commit comments