Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Apr 18, 2017
2 parents 12b78ac + 10eaf26 commit 180f828
Show file tree
Hide file tree
Showing 36 changed files with 425 additions and 216 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ Facebook has adopted a Code of Conduct that we expect project participants to ad

Read our [contributing guide](https://facebook.github.io/react/contributing/how-to-contribute.html) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React.

### Good First Bug
### Beginner Friendly Bugs

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 bugs](https://github.com/facebook/react/labels/Difficulty%3A%20beginner) that contain bugs which are fairly easy to fix. This is a great place to get started.

### License

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
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
4 changes: 2 additions & 2 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 @@ -223,7 +223,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
4 changes: 2 additions & 2 deletions docs/contributing/how-to-contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ npm start

Create React App doesn't handle backend logic or databases; it just creates a frontend build pipeline, so you can use it with any backend you want. It uses build tools like Babel and webpack under the hood, but works with zero configuration.

When you're ready to deploy to production, running `npm run build` will create an optimized build of your app in the `build` folder. You can learn more about Create React App [from its README](https://github.com/facebookincubator/create-react-app#create-react-app-) and the [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#table-of-contents).

<block id="existingapptab" role="tabpanel" class="existingapp" />

## Adding React to an Existing Application
Expand Down Expand Up @@ -179,10 +181,6 @@ To create an optimized production build with Brunch, just add the `-p` flag to t

Run Browserify with `NODE_ENV` environment variable set to `production` and use [UglifyJS](https://github.com/mishoo/UglifyJS) as the last build step so that development-only code gets stripped out.

#### Create React App

If you use [Create React App](https://github.com/facebookincubator/create-react-app), `npm run build` will create an optimized build of your app in the `build` folder.

#### Rollup

Use [rollup-plugin-replace](https://github.com/rollup/rollup-plugin-replace) plugin together with [rollup-plugin-commonjs](https://github.com/rollup/rollup-plugin-commonjs) (in that order) to remove development-only code. [See this gist](https://gist.github.com/Rich-Harris/cb14f4bc0670c47d00d191565be36bf0) for a complete setup example.
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/jsx-in-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function Story(props) {

To fix this, we will assign the type to a capitalized variable first:

```js{9-11}
```js{10-12}
import React from 'react';
import { PhotoStory, VideoStory } from './stories';
Expand All @@ -172,7 +172,7 @@ function Story(props) {

There are several different ways to specify props in JSX.

### JavaScript Expressions
### JavaScript Expressions as Props

You can pass any JavaScript expression as a prop, by surrounding it with `{}`. For example, in this JSX:

Expand Down Expand Up @@ -308,7 +308,7 @@ You can mix together different types of children, so you can use string literals

A React component can't return multiple React elements, but a single JSX expression can have multiple children, so if you want a component to render multiple things you can wrap it in a `div` like this.

### JavaScript Expressions
### JavaScript Expressions as Children

You can pass any JavaScript expression as children, by enclosing it within `{}`. For example, these expressions are equivalent:

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/reference-react-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ If you "fork" props by using them for state, you might also want to implement [`
componentWillMount()
```

`componentWillMount()` is invoked immediately before mounting occurs. It is called before `render()`, therefore setting state in this method will not trigger a re-rendering. Avoid introducing any side-effects or subscriptions in this method.
`componentWillMount()` is invoked immediately before mounting occurs. It is called before `render()`, therefore setting state synchronously in this method will not trigger a re-rendering. Avoid introducing any side-effects or subscriptions in this method.

This is the only lifecycle hook called on server rendering. Generally, we recommend using the `constructor()` instead.

Expand Down
Loading

0 comments on commit 180f828

Please sign in to comment.