Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pines-Cheng committed Aug 27, 2019
1 parent 9d94380 commit cbc75e4
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
32 changes: 25 additions & 7 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ title: Taro 介绍

## 简介

**Taro** 是一套遵循 [React](https://reactjs.org/) 语法规范的 **多端开发** 解决方案。现如今市面上端的形态多种多样,Web、React-Native、微信小程序等各种端大行其道,当业务要求同时在不同的端都要求有所表现的时候,针对不同的端去编写多套代码的成本显然非常高,这时候只编写一套代码就能够适配到多端的能力就显得极为需要。
**Taro** 是一套遵循 [React](https://reactjs.org/) 语法规范的 **多端开发** 解决方案。

现如今市面上端的形态多种多样,Web、React-Native、微信小程序等各种端大行其道,当业务要求同时在不同的端都要求有所表现的时候,针对不同的端去编写多套代码的成本显然非常高,这时候只编写一套代码就能够适配到多端的能力就显得极为需要。

使用 **Taro**,我们可以只书写一套代码,再通过 **Taro** 的编译工具,将源代码分别编译出可以在不同端(微信/百度/支付宝/字节跳动/QQ小程序、快应用、H5、React-Native 等)运行的代码。

## 特性

#### React 语法风格

**Taro** 遵循 [React](https://reactjs.org/) 语法规范,它采用与 React 一致的组件化思想,组件生命周期与 React 保持一致,同时支持使用 JSX 语法,让代码具有更丰富的表现力,使用 **Taro** 进行开发可以获得和 React 一致的开发体验。
**Taro** 遵循 [React](https://reactjs.org/) 语法规范,它采用与 React 一致的组件化思想,组件生命周期与 React 保持一致,同时支持使用 [JSX 语法](jsx.html),让代码具有更丰富的表现力,使用 **Taro** 进行开发可以获得和 React 一致的开发体验。

代码示例

Expand Down Expand Up @@ -63,6 +65,8 @@ export default class Index extends Component {
}
```

> 由于微信小程序端的限制,有极少数 JSX 的优秀用法暂时不能得到很好地支持,同时,为了遵循 React 与法,Taro 在写法上也有一些自己的规范,具体可以参考:[Taro 开发最佳实践](best-practice.html)
#### 快速开发微信小程序

Taro 立足于微信小程序开发,众所周知小程序的开发体验并不是非常友好,比如小程序中无法使用 npm 来进行第三方库的管理,无法使用一些比较新的 ES 规范等等,针对小程序端的开发弊端,Taro 具有以下的优秀特性
Expand Down Expand Up @@ -93,22 +97,36 @@ Taro 方案的初心就是为了打造一个多端开发的解决方案。目前

## Taro UI

一款基于 `Taro` 框架开发的多端 UI 组件库
一款基于 `Taro` 框架开发的多端 UI 组件库

#### Taro UI 特性
[Taro UI](https://taro-ui.jd.com) 特性

- 基于 `Taro` 开发 UI 组件
- 一套组件可以在 `微信小程序``支付宝小程序``百度小程序``H5` 多端适配运行(`ReactNative` 端暂不支持)
- 提供友好的 API,可灵活的使用组件

[Taro UI 官网](https://taro-ui.jd.com)
## 学习资源

### 官方文章精选
- [使用 React Hooks 重构你的小程序](https://aotu.io/notes/2019/07/10/taro-hooks/)
- [Taro 1.3 震撼发布:全面支持 JSX 语法和 HOOKS](https://aotu.io/notes/2019/06/13/taro-1-3/)
- [小程序框架全面测评](https://aotu.io/notes/2019/03/12/mini-program-framework-full-review/)
- [Taro 在京东购物小程序上的实践](https://aotu.io/notes/2018/09/11/taro-in-jd/)
- [用 React 开发小程序的探索之路 (演讲内容整理)| 掘金开发者大会](https://juejin.im/post/5ba346a7f265da0ad13b78bd)
- [为何我们要用 React 来写小程序 - Taro 诞生记](https://aotu.io/notes/2018/06/25/the-birth-of-taro/)
- [多端统一开发框架 - Taro介绍](https://aotu.io/notes/2018/06/07/Taro/)

## 学习资源
### 分享交流
- [第十三届 D2 前端技术论坛——使用 Taro 快速构建多端应用](https://www.yuque.com/d2forum/content/d213#6a1363f4)
- [WeGeek直播课:从0到1快速开发电商小程序](https://link.juejin.im/?target=https%3A%2F%2Fcloud.tencent.com%2Fedu%2Flearning%2Flive-1497)
- [掘金开发者大会——用React开发小程序的探索之路](https://www.itdks.com/Course/detail?id=16289)

[awesome-taro](https://github.com/NervJS/awesome-taro)
### 其他
更多文章教程、开源项目等,请参考:[awesome-taro](https://github.com/NervJS/awesome-taro)

掘金小册:[Taro 多端开发实现原理与实战](https://juejin.im/book/5b73a131f265da28065fb1cd?referrer=5ba228f16fb9a05d3251492d)

## 开发交流
扫码添加 `凹凸实验室-小助手` ,回复 `Taro` 即可进群。(Taro 开发交流12群 已满)

![image](https://camo.githubusercontent.com/519861ac48c204c6038cea71ea10e1d991f36163/68747470733a2f2f696d6733302e333630627579696d672e636f6d2f6c696e672f6a66732f74312f38313133312f31332f3730302f33353431312f35636566343339664538616366366163342f323331393531336663303734303465362e706e67)
22 changes: 22 additions & 0 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,28 @@
},
"version-1.3.14/version-1.3.14-wxcloud": {
"title": "小程序云开发模板"
},
"version-1.3.15/components/open/version-1.3.15-ad": {
"title": "Ad",
"sidebar_label": "Ad"
},
"version-1.3.15/components/open/version-1.3.15-official-account": {
"title": "OfficialAccount",
"sidebar_label": "OfficialAccount"
},
"version-1.3.15/components/open/version-1.3.15-open-data": {
"title": "OpenData",
"sidebar_label": "OpenData"
},
"version-1.3.15/components/open/version-1.3.15-others": {
"title": "其他",
"sidebar_label": "其他"
},
"version-1.3.15/version-1.3.15-GETTING-STARTED": {
"title": "安装及使用"
},
"version-1.3.15/version-1.3.15-size": {
"title": "设计稿及尺寸单位"
}
},
"links": {
Expand Down
2 changes: 1 addition & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"size",
"static-reference",
"component-style",
"best-practice",
{
"label": "语法特性",
"type": "subcategory",
Expand All @@ -36,7 +37,6 @@
"ref"
]
},
"best-practice",
"debug",
{
"label": "多端开发",
Expand Down

0 comments on commit cbc75e4

Please sign in to comment.