Skip to content

Commit

Permalink
Pull all docs updates from 15-stable into 15.6-dev (#9889)
Browse files Browse the repository at this point in the history
In order to ensure consistency between the 15-stable and 15.6 branches, we found all the diffs present only in 15-stable and cherry-picked them onto 15.6-dev.

These are 100% documentation updates, which is why we didn't bother cherry-picking them in the first place, but having them on the 15.6-dev branch makes the two branches more consistent and that is better.

Nobody will accidentally see outdated docs on the 15.6-dev branch
these diffs won't somehow be lost or overwritten when we combine the branches to release 15.6.
Test Plan:
Manually tested the docs, looking at many of the updated pages. Also ran all tests etc.
Changelog below:
---

* Fix the proptypes deprecation warning url on the "Don't Call PropTypes Warning" doc page (#9419)

* Use the same prop-types link on the warning docs page as the main proptypes doc page

* Link to repo instead

* Docs: Clarification of setState() behavior (#9329)

* Clarification of setState() behavior

`setState()` is a frequent source of confusion for people new to React, and I believe part of that is due to minimization of the impact of the asynchronous behavior of `setState()` in the documentation. This revision is an attempt to clarify that behavior. For motivation and justification, see [setState Gate](https://medium.com/javascript-scene/setstate-gate-abc10a9b2d82).

* Update reference-react-component.md

* Signature fix

* Update to address @acdlite concerns

* Add more details

* Update proptypes doc (#9391)

* Update proptypes doc

* Removed note

* Add tabs to installation page (#9275, #9277) (#9401)

* Add tabs to installation page (#9275, #9277)

This adds tabs for create-react-app and existing apps to the installation section of the docs. The tab implementation is a simplified version of React Native's installation page.

Fixes #9275.

* Use classList instead of className

* Use same implementation as in RN

* Refractor docs to indicate that state set to props in constructor will not recieve the updated props (#9404)

* Switch Installation to a tab when hash is present (#9422)

* Updated the Good First Bug section in readme (#9429)

* Updated the Good First Bug section in readme

* Inconsistent use of quotes. Prefered single quotes instead of double quotes

* Updated Good first bug link in how_to_contribute doc.

* Undo JSX attribute quote change

* don't capitalize "beginner friendly issue"

(cherry picked from commit 36c935c)

* [Documentation] Impreove the react-component section of doc (#9349)

* Impreove react-component of doc

[#9304](#9304)

* update description

* add missing space

(cherry picked from commit 359f5d2)

* Unique headings for linking purposes (#9259)

Previously two headings were 'Javascript Expressions' - now 'Javascript
Expressions as Props' and 'Javascript Expressions as Children'
(cherry picked from commit 363f6cb)

* Update jsx-in-depth.md (#9178)

* Update jsx-in-depth.md

Line 9 isn't changed

* Move selection down

* Fix

(cherry picked from commit ccb38a9)

* Sort out conferences by date (#9172)

(cherry picked from commit 37f9e35)

* Lift state up - Updating the documentation to mention that onClick is a synthetic event handler (#9427)

* Lift state up - Updating the documentation to mention that onClick is a synthetic event handler

* Review comments - Rephrase to handle synthetic events and event handler patterns

* Tweak

(cherry picked from commit 53a3939)

* Fixed grammar (#9432)

* Update codebase-overview.md

* Some more fixes

(cherry picked from commit d724115)

* [Tutorial] ES6, installation, and button closing tag (#9441)

* adds notes to tutorial on es6 and installation

* fixes tutorial mention of opening button tag

* More writing

* Update

* Minor tweaks to tutorial

* Fix duplicate sentence

* Minor tutorial nits

* Add missing tutorial sidebar links

* Tweak tutorial structure

* FIX: Move CRA build info under it's tab page (#9452)

* FIX: Move CRA build info under it's tab page

* Add some links

* Reorganize the "following along" instructions (#9453)

* Reorganize the "following along" instructions

* Minor tweaks

(cherry picked from commit 1ce562e)

* [Docs] Add accessibility to tabs in installation documentation (#9431)

* Add accessibility to tabs in installation documentation

* Change color and fix styling

(cherry picked from commit 9526174)

* [Docs: Installation] Fix tabs responsive layout - Resubmit (#9458)

* [Docs: Installation] Fix tabs responsive layout

* Move tabs a pixel down

* Remove left margin on first tab

* Remove the long line

* Fix mobile styles

(cherry picked from commit a92128e)

* Add more details in jsx-in-depth.md (#9006)

* jsx-in-depth.md add ternary statement for javascript expressions section

* jsx-in-depth.md add explanation to get falsey values for props

* update jsx-in-depth.md

* ensure links work locally, remove section about falsey prop values

* Fix links

* Add link to 'Typechecking with PropTypes' under 'Advanced Guides' (#9472)

This should have been retained in our docs, since PropTypes are only
moved and not deprecated.

Partially handles #9467, and I'll make a separate PR to
https://github.com/reactjs/prop-types to add more docs to the README
there.
(cherry picked from commit 39ca8aa)

* Updates how-to-contribute.md to use JSFiddle referenced in submit Git issue template (#9503)

(cherry picked from commit c8a64e2)

* Describe fixtures dir in the codebase overview (#9516)

* Describe fixtures dir in overview

* Fix folder name

(cherry picked from commit d12c41c)

* adds indirect refs to docs (#9528)

* adds indirect refs to docs

* Add more info

* Explain clearer

* Rephrase

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

* Update refs-and-the-dom.md

(cherry picked from commit 14fa8a5)

* Add reference to the Hyperscript libraries (#9517)

* Add reference to the Hyperscript libraries

I feel these should be mentioned as they provide terser syntax than using `R.createElement` directly, even with a shorthand.

* Rephrase

(cherry picked from commit a8c223a)

* [Docs] Fix confusing description for the <script>...</script> usage (#9502)

* Fix confusing description for the <script>...</script> usage

* Update jsx-in-depth.md

* Update reference-react-dom-server.md

* Update reference-react-dom.md

* Update reference-react.md

(cherry picked from commit 3d60d4c)

* [site] Load libraries from unpkg (#9499)

* [site] Load libraries from unpkg

* Revert Gemfile changes

(cherry picked from commit cf24d87)

* fixed error formatting in live editor (#9497)

(cherry picked from commit 7ccfb07)

* React.createElement syntax (#9459)

* React.createElement syntax

Added React.createElement syntax.
I think this is required for this tutorial.

* Reword

(cherry picked from commit 9824d52)

* Add guide on integrating with non-react code (#9316)

* Add guide on integrating with non-react code

* Capitalize guide title

* Make links to other docs relative

* Rephrase 'What it does do'

* Remove experimental syntax

* Capitalize Backbone

* Remove empty lifecycle method in generic jQuery example

* Use shouldComponentUpdate() not componentWillUpdate()

* Prefer single quotes

* Add cleanup to generic jQuery example

* Capitalize React

* Generalize the section on Backbone Views

* Generalize the section on Backbone Models, a little

* Add introduction

* Adjust wording

* Simplify ref callbacks

* Fix typo in generic jQuery example

* Fix typos in Backbone models in React components

* Fix more typos in Backbone models in React components

* Add generic section on integrating with other view libraries

* Stress the benefits of an unchanging React element

* Small changes to introduction

* Add missing semicolon

* Revise generic jQuery wrapper section

Moved the section on using empty elements to prevent conflicts above the
code example and added brief introduction to that example.

* Add usage example for Chosen wrapper

* Prevent Chosen wrapper from updating

* Note that sharing the DOM with plugins is not recommended

* Mention how React is used at Facebook

* Mention React event system in template rendering section

* Remove destructuring from function parameters

* Do not name React components Component

* Elaborate on unmountComponentAtNode()

* Mention preference for unidirectional data flow

* Rename backboneModelAdapter

* Replace rest syntax

* Respond to updated model in connectToBackboneModel

* Rewrite connectToBackboneModel example

* Rework connectToBackboneModel example

* Misc changes

* Misc changes

* Change wording

* Tweak some parts

(cherry picked from commit 1816d06)

* Don't build gh-pages branch on CircleCI (#9442)
  • Loading branch information
flarnie authored Jun 7, 2017
1 parent e5b3554 commit a9a8124
Show file tree
Hide file tree
Showing 31 changed files with 921 additions and 33,206 deletions.
5 changes: 0 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
general:
branches:
ignore:
- gh-pages

machine:
timezone: America/Los_Angeles
node:
Expand Down
4 changes: 4 additions & 0 deletions docs/_data/nav_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
items:
- id: jsx-in-depth
title: JSX In Depth
- id: typechecking-with-proptypes
title: Typechecking With PropTypes
- id: refs-and-the-dom
title: Refs and the DOM
- id: uncontrolled-components
Expand All @@ -48,6 +50,8 @@
title: Web Components
- id: higher-order-components
title: Higher-Order Components
- id: integrating-with-other-libraries
title: Integrating with Other Libraries
- title: Reference
items:
- id: react-api
Expand Down
19 changes: 18 additions & 1 deletion docs/_data/nav_tutorial.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
- title: Tutorial
items:
- id: tutorial
title: Overview
title: Before We Start
subitems:
- id: what-were-building
title: What We're Building
href: /react/tutorial/tutorial.html#what-were-building
forceInternal: true
- id: prerequisites
title: Prerequisites
href: /react/tutorial/tutorial.html#prerequisites
forceInternal: true
- id: how-to-follow-along
title: How to Follow Along
href: /react/tutorial/tutorial.html#how-to-follow-along
forceInternal: true
- id: help-im-stuck
title: Help, I'm Stuck!
href: /react/tutorial/tutorial.html#help-im-stuck
forceInternal: true
- id: overview
title: Overview
href: /react/tutorial/tutorial.html#overview
forceInternal: true
subitems:
- id: what-is-react
title: What is React?
href: /react/tutorial/tutorial.html#what-is-react
Expand Down
2 changes: 1 addition & 1 deletion docs/_js/live_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ var ReactPlayground = React.createClass({
} catch (err) {
this.setTimeout(function() {
ReactDOM.render(
<div className="playgroundError">{err.toString()}</div>,
<pre style={{overflowX: 'auto'}} className="playgroundError">{err.toString()}</pre>,
mountNode
);
}, 500);
Expand Down
22 changes: 11 additions & 11 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
<script>try{Typekit.load();}catch(e){}</script>

<!--[if lte IE 8]>
<script src="/react/js/html5shiv.min.js"></script>
<script src="/react/js/es5-shim.min.js"></script>
<script src="/react/js/es5-sham.min.js"></script>
<script src="https://unpkg.com/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
<script src="https://unpkg.com/es5-shim@4.5.9/es5-shim.min.js"></script>
<script src="https://unpkg.com/es5-shim@4.5.9/es5-sham.min.js"></script>
<![endif]-->
<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
<script src="/react/js/codemirror.js"></script>
<script src="/react/js/javascript.js"></script>
<script src="/react/js/xml.js"></script>
<script src="/react/js/jsx.js"></script>
<script src="/react/js/react.js"></script>
<script src="/react/js/react-dom.js"></script>
<script src="/react/js/babel.min.js"></script>
<script src="https://unpkg.com/docsearch.js@1.5.0/dist/cdn/docsearch.min.js"></script>
<script src="https://unpkg.com/codemirror@5.15.2"></script>
<script src="https://unpkg.com/codemirror@5.15.2/mode/javascript/javascript.js"></script>
<script src="https://unpkg.com/codemirror@5.15.2/mode/xml/xml.js"></script>
<script src="https://unpkg.com/codemirror@5.15.2/mode/jsx/jsx.js"></script>
<script src="https://unpkg.com/react/dist/react.min.js"></script>
<script src="https://unpkg.com/react-dom/dist/react-dom.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<script src="/react/js/live_editor.js"></script>
</head>
<body>
Expand Down
5 changes: 5 additions & 0 deletions docs/circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
general:
branches:
ignore:
- gh-pages
20 changes: 10 additions & 10 deletions docs/community/conferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ March 28th at the [QEII Centre, London](http://qeiicentre.london/)

[Website](http://react.london/)

### ReactEurope 2017
May 18th & 19th in Paris, France

[Website](http://www.react-europe.org/) - [Schedule](http://www.react-europe.org/#schedule)

### React Amsterdam 2017
April 21st in Amsterdam, The Netherlands

[Website](https://react.amsterdam) - [Twitter](https://twitter.com/reactamsterdam)

### ReactEurope 2017
May 18th & 19th in Paris, France

[Website](http://www.react-europe.org/) - [Schedule](http://www.react-europe.org/#schedule)

### Chain React 2017
July 10-11 in Portland, Oregon USA

Expand All @@ -34,6 +34,11 @@ August 24-25 in Salt Lake City, Utah USA

[Website](http://www.reactrally.com) - [Twitter](https://twitter.com/reactrally)

### React Native EU 2017
September 6-7 in Wroclaw, Poland

[Website](http://react-native.eu/)

### ReactJS Day 2017
October 6th in Verona, Italy

Expand All @@ -44,11 +49,6 @@ October 13 in Stockholm, Sweden

[Website](https://statejs.com/)

### React Native EU 2017
September 6-7 in Wroclaw, Poland

[Website](http://react-native.eu/)


## Past Conferences

Expand Down
7 changes: 3 additions & 4 deletions docs/contributing/codebase-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var setInnerHTML = require('setInnerHTML');

Haste was originally developed for giant apps like Facebook. It's easy to move files to different folders and import them without worrying about relative paths. The fuzzy file search in any editor always takes you to the correct place thanks to globally unique names.

React itself was extracted from the Facebook codebase and uses Haste for historical reasons. In the future, we will probably [migrate React to use CommonJS or ES Modules](https://github.com/facebook/react/issues/6336) to be more aligned with the community. However, this requires changes in Facebook internal infrastructure so it is unlikely to happen very soon.
React itself was extracted from Facebook's codebase and uses Haste for historical reasons. In the future, we will probably [migrate React to use CommonJS or ES Modules](https://github.com/facebook/react/issues/6336) to be more aligned with the community. However, this requires changes in Facebook's internal infrastructure so it is unlikely to happen very soon.

**Haste will make more sense to you if you remember a few rules:**

Expand Down Expand Up @@ -66,6 +66,7 @@ After cloning the [React repository](https://github.com/facebook/react), you wil

* [`src`](https://github.com/facebook/react/tree/master/src) is the source code of React. **If your change is related to the code, `src` is where you'll spend most of your time.**
* [`docs`](https://github.com/facebook/react/tree/master/docs) is the React documentation website. When you change APIs, make sure to update the relevant Markdown files.
* [`fixtures`](https://github.com/facebook/react/tree/master/fixtures) contains a few small React test applications for contributors.
* [`packages`](https://github.com/facebook/react/tree/master/packages) contains metadata (such as `package.json`) for all packages in the React repository. Nevertheless, their source code is still located inside [`src`](https://github.com/facebook/react/tree/master/src).
* `build` is the build output of React. It is not in the repository but it will appear in your React clone after you [build it](/react/contributing/how-to-contribute.html#development-workflow) for the first time.

Expand Down Expand Up @@ -223,7 +224,7 @@ module.exports = ReactDOMComponent;

The `Mixin` in this code has no relation to React `mixins` feature. It is just a way of grouping a few methods under an object. Those methods may later get attached to some other class. We use this pattern in a few places although we try to avoid it in the new code.

Equivalent code in ES6 would look like this:
The equivalent code in ES6 would look like this:

```js
class ReactDOMComponent {
Expand Down Expand Up @@ -301,10 +302,8 @@ While the code is separated in the source tree, the exact package boundaries are
The "core" of React includes all the [top-level `React` APIs](/react/docs/top-level-api.html#react), for example:

* `React.createElement()`
* `React.createClass()`
* `React.Component`
* `React.Children`
* `React.PropTypes`

**React core only includes the APIs necessary to define components.** It does not include the [reconciliation](/react/docs/reconciliation.html) algorithm or any platform-specific code. It is used both by React DOM and React Native components.

Expand Down
6 changes: 3 additions & 3 deletions docs/contributing/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ We are using [GitHub Issues](https://github.com/facebook/react/issues) for our p

#### Reporting New Issues

The best way to get your bug fixed is to provide a reduced test case. This [JSFiddle template](https://jsfiddle.net/reactjs/69z2wepo/) is a great starting point.
The best way to get your bug fixed is to provide a reduced test case. This [JSFiddle template](https://jsfiddle.net/84v837e9/) is a great starting point.

#### Security Bugs

Expand All @@ -64,7 +64,7 @@ Working on your first Pull Request? You can learn how from this free video serie

**[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)**

To help you get your feet wet and get you familiar with our contribution process, we have a list of **[good first bugs](https://github.com/facebook/react/labels/good%20first%20bug)** that contain bugs which are fairly easy to fix. This is a great place to get started.
To help you get your feet wet and get you familiar with our contribution process, we have a list of **[beginner friendly issues](https://github.com/facebook/react/issues?q=is%3Aopen+is%3Aissue+label%3A%22Difficulty%3A+beginner%22)** that contain bugs which are fairly easy to fix. This is a great place to get started.

If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don't accidentally duplicate your effort.

Expand Down Expand Up @@ -101,7 +101,7 @@ In order to accept your pull request, we need you to submit a CLA. You only need

### Development Workflow

After cloning React, run `npm install` to fetch its dependencies.
After cloning React, run `npm install` to fetch its dependencies.
Then, you can run several commands:

* `npm run lint` checks the code style.
Expand Down
Loading

0 comments on commit a9a8124

Please sign in to comment.