From 4a3b790ce465692ab7f59c35c1b6719b55c4c33c Mon Sep 17 00:00:00 2001 From: Flarnie Marchan Date: Fri, 7 Apr 2017 13:47:54 -0700 Subject: [PATCH] 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 --- docs/docs/addons.md | 4 ++-- docs/docs/components-and-props.md | 2 ++ docs/docs/composition-vs-inheritance.md | 2 ++ docs/docs/conditional-rendering.md | 2 ++ docs/docs/context.md | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/docs/addons.md b/docs/docs/addons.md index 982f5e481fc59..d0f6a770b8ec4 100644 --- a/docs/docs/addons.md +++ b/docs/docs/addons.md @@ -34,8 +34,8 @@ The add-ons below are considered legacy and their use is discouraged. You can install the add-ons individually from npm (e.g. `npm install react-addons-create-fragment`) and import them: ```javascript -import Perf from 'react-addons-perf'; // ES6 -var Perf = require('react-addons-perf'); // ES5 with npm +import createFragment from 'react-addons-create-fragment'; // ES6 +var createFragment = require('react-addons-create-fragment'); // ES5 with npm ``` When using a CDN, you can use `react-with-addons.js` instead of `react.js`: diff --git a/docs/docs/components-and-props.md b/docs/docs/components-and-props.md index d1bf5ca9d3664..150138fb91b60 100644 --- a/docs/docs/components-and-props.md +++ b/docs/docs/components-and-props.md @@ -12,6 +12,8 @@ redirect_from: - "docs/transferring-props-zh-CN.html" - "tips/props-in-getInitialState-as-anti-pattern.html" - "tips/communicate-between-components.html" +prev: rendering-elements.html +next: state-and-lifecycle.html --- Components let you split the UI into independent, reusable pieces, and think about each piece in isolation. diff --git a/docs/docs/composition-vs-inheritance.md b/docs/docs/composition-vs-inheritance.md index 2817811a669c4..0ac5cd45b21cc 100644 --- a/docs/docs/composition-vs-inheritance.md +++ b/docs/docs/composition-vs-inheritance.md @@ -3,6 +3,8 @@ id: composition-vs-inheritance title: Composition vs Inheritance permalink: docs/composition-vs-inheritance.html redirect_from: "docs/multiple-components.html" +prev: lifting-state-up.html +next: thinking-in-react.html --- React has a powerful composition model, and we recommend using composition instead of inheritance to reuse code between components. diff --git a/docs/docs/conditional-rendering.md b/docs/docs/conditional-rendering.md index 7cfc60a8f9531..ea1be02a4c850 100644 --- a/docs/docs/conditional-rendering.md +++ b/docs/docs/conditional-rendering.md @@ -2,6 +2,8 @@ id: conditional-rendering title: Conditional Rendering permalink: docs/conditional-rendering.html +prev: handling-events.html +next: lists-and-keys.html redirect_from: "tips/false-in-jsx.html" --- diff --git a/docs/docs/context.md b/docs/docs/context.md index e3efaf5d5b308..718e941a06418 100644 --- a/docs/docs/context.md +++ b/docs/docs/context.md @@ -5,7 +5,7 @@ permalink: docs/context.html --- >Note: -> 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`. +> 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`. 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.