Update example snippet in old 'React.addons' doc page (#9363)
* Update example snippet in old 'React.addons' doc page This makes the example more consistent. * Add back the pointers in docs that were mistakenly removed In https://github.com/facebook/react/pull/9359 we accidentally removed pointers in some doc pages. Putting them back now. * Link to npm package instead of github page This seems like a more stable place to link to in the 'context' document. Based on @bvaughn's feedback in https://github.com/facebook/react/pull/9359
Flarnie Marchan committed
Apr 7, 2017 at 13:47 UTC
6eaa539ad5fc608473540496b0f3b9c1688afeb0
5 files changed
+9
-3
docs/docs/addons.md
+2
-2
@@ -34,8 +34,8 @@ The add-ons below are considered legacy and their use is discouraged.
34
You can install the add-ons individually from npm (e.g. `npm install react-addons-create-fragment`) and import them:
35
36
```javascript
37
-import Perf from 'react-addons-perf'; // ES6
38
-var Perf = require('react-addons-perf'); // ES5 with npm
37
+import createFragment from 'react-addons-create-fragment'; // ES6
38
+var createFragment = require('react-addons-create-fragment'); // ES5 with npm
39
```
40
41
When using a CDN, you can use `react-with-addons.js` instead of `react.js`:
docs/docs/components-and-props.md
+2
@@ -12,6 +12,8 @@ redirect_from:
12
- "docs/transferring-props-zh-CN.html"
13
- "tips/props-in-getInitialState-as-anti-pattern.html"
14
- "tips/communicate-between-components.html"
15
+prev: rendering-elements.html
16
+next: state-and-lifecycle.html
17
---
18
19
Components let you split the UI into independent, reusable pieces, and think about each piece in isolation.
docs/docs/composition-vs-inheritance.md
+2
@@ -3,6 +3,8 @@ id: composition-vs-inheritance
3
title: Composition vs Inheritance
4
permalink: docs/composition-vs-inheritance.html
5
redirect_from: "docs/multiple-components.html"
6
+prev: lifting-state-up.html
7
+next: thinking-in-react.html
8
---
9
10
React has a powerful composition model, and we recommend using composition instead of inheritance to reuse code between components.
docs/docs/conditional-rendering.md
+2
@@ -2,6 +2,8 @@
2
id: conditional-rendering
3
title: Conditional Rendering
4
permalink: docs/conditional-rendering.html
5
+prev: handling-events.html
6
+next: lists-and-keys.html
7
redirect_from: "tips/false-in-jsx.html"
8
---
9
docs/docs/context.md
+1
-1
@@ -5,7 +5,7 @@ permalink: docs/context.html
5
---
6
7
>Note:
8
-> As of React v15.5 the `React.PropTypes` helper is deprecated, and we recommend using the [`prop-types` library](https://github.com/aackerman/PropTypes) to define `contextTypes`.
8
+> As of React v15.5 the `React.PropTypes` helper is deprecated, and we recommend using the [`prop-types` library](https://www.npmjs.com/package/prop-types) to define `contextTypes`.
9
10
With React, it's easy to track the flow of data through your React components. When you look at a component, you can see which props are being passed, which makes your apps easy to reason about.
11