Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example snippet in old 'React.addons' doc page #9363

Merged
merged 3 commits into from
Apr 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/components-and-props.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/composition-vs-inheritance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/conditional-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
---

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/context.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down