Skip to content

Commit 07efebf

Browse files
committed
Update links to React and webpack docs. PR726
1 parent e1378e5 commit 07efebf

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

doc/handbook/JSX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[JSX](https://facebook.github.io/jsx/)是一种嵌入式的类似XML的语法。
44
它可以被转换成合法的JavaScript,尽管转换的语义是依据不同的实现而定的。
5-
JSX因[React](http://facebook.github.io/react/)框架而流行,但是也被其它应用所使用。
5+
JSX因[React](https://reactjs.org/)框架而流行,但是也被其它应用所使用。
66
TypeScript支持内嵌,类型检查和将JSX直接编译为JavaScript。
77

88
# 基本用法

doc/handbook/tutorials/React & Webpack.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
这篇指南将会教你如何将TypeScript和[React](http://facebook.github.io/react/)还有[webpack](http://webpack.github.io/)结合在一起使用。
1+
这篇指南将会教你如何将TypeScript和[React](https://reactjs.org/)还有[webpack](http://webpack.github.io/)结合在一起使用。
22

33
如果你正在做一个全新的工程,可以先阅读这篇[React快速上手指南](./React.md)
44

@@ -122,7 +122,7 @@ export const Hello = (props: HelloProps) => <h1>Hello from {props.compiler} and
122122

123123
```
124124

125-
注意这个例子使用了[无状态的功能组件](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions),我们可以让它更像一点**
125+
注意这个例子使用了[无状态的功能组件](https://reactjs.org/docs/components-and-props.html#functional-and-class-components),我们可以让它更像一点**
126126

127127
```ts
128128
import * as React from "react";

doc/handbook/tutorials/React.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
这篇快速上手指南会教你如何将TypeScript与[React](http://facebook.github.io/react/)结合起来使用。
1+
这篇快速上手指南会教你如何将TypeScript与[React](https://reactjs.org/)结合起来使用。
22
在最后,你将学到:
33

44
* 使用TypeScript和React创建工程
@@ -9,7 +9,7 @@
99
我们会使用[create-react-app](https://github.com/facebookincubator/create-react-app)工具快速搭建工程环境。
1010

1111
这里假设你已经在使用[Node.js](https://nodejs.org/)[npm](https://www.npmjs.com/)
12-
并且已经了解了[React的基础知识](https://facebook.github.io/react/docs/hello-world.html)
12+
并且已经了解了[React的基础知识](https://reactjs.org/docs/hello-world.html)
1313

1414
# 安装create-react-app
1515

@@ -146,7 +146,7 @@ function getExclamationMarks(numChars: number) {
146146
具体来讲,`Hello`是一个函数,接收一个`Props`对象并拆解它。
147147
如果`Props`对象里没有设置`enthusiasmLevel`,默认值为`1`
148148

149-
使用函数是React中定义组件的[两种方式](https://facebook.github.io/react/docs/components-and-props.html#functional-and-class-components)之一。
149+
使用函数是React中定义组件的[两种方式](https://reactjs.org/docs/components-and-props.html#functional-and-class-components)之一。
150150
如果你喜欢的话,也*可以*通过类的方式定义:
151151

152152
```ts
@@ -169,7 +169,7 @@ class Hello extends React.Component<Props, object> {
169169
}
170170
```
171171

172-
当我们的[组件具有某些状态](https://facebook.github.io/react/docs/state-and-lifecycle.html)的时候,使用类的方式是很有用处的。
172+
当我们的[组件具有某些状态](https://reactjs.org/docs/state-and-lifecycle.html)的时候,使用类的方式是很有用处的。
173173
但在这个例子里我们不需要考虑状态 - 事实上,在`React.Component<Props, object>`我们把状态指定为了`object`,因此使用SFC更简洁。
174174
当在创建可重用的通用UI组件的时候,在表现层使用组件局部状态比较适合。
175175
针对我们应用的生命周期,我们会审视应用是如何通过Redux轻松地管理普通状态的。
@@ -464,7 +464,7 @@ export function enthusiasm(state: StoreState, action: EnthusiasmAction): StoreSt
464464
你可能想要对reducer写一些测试。
465465
因为reducers是纯函数,它们可以传入任意的数据。
466466
针对每个输入,可以测试reducers生成的新的状态。
467-
可以考虑使用Jest的[toEqual](https://facebook.github.io/jest/docs/expect.html#toequalvalue)方法。
467+
可以考虑使用Jest的[toEqual](https://facebook.github.io/jest/docs/en/expect.html#toequalvalue)方法。
468468

469469
## 创建容器
470470

doc/release-notes/TypeScript 1.8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ switch (x % 3) {
124124

125125
## React 无状态的函数组件
126126

127-
TypeScript 现在支持[无状态的函数组件](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions).
127+
TypeScript 现在支持[无状态的函数组件](https://reactjs.org/docs/components-and-props.html#functional-and-class-components).
128128
它是可以组合其他组件的轻量级组件.
129129

130130
```ts

0 commit comments

Comments
 (0)