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

Merge changes from master into Gatsby branch #10853

Merged
merged 31 commits into from
Sep 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
cdfbe6b
Update changelog for unreleased 16.0 changes (#10730)
flarnie Sep 22, 2017
a160f3e
Fixes #9667: Updated createTextInstance to create the text node on co…
kenotron Sep 22, 2017
4c45058
Record sizes
gaearon Sep 24, 2017
7b2101e
Add a changelog for elements having the same key (#10811)
koba04 Sep 25, 2017
f9bfd08
Markdown fixs on "DOM Attributes in React 16" post (#10816)
joecritch Sep 25, 2017
6e8c09c
Include tag name into the table snapshot (#10818)
gaearon Sep 25, 2017
b24d23d
Update DOM warning wording and link (#10819)
gaearon Sep 25, 2017
d63249d
Update license headers BSD+Patents -> MIT
sophiebits Sep 24, 2017
b765fb2
Change license and remove references to PATENTS
sophiebits Sep 24, 2017
e932ad6
Version bumps to use MIT license
sophiebits Sep 25, 2017
b9d5569
Add ReactTestRenderer documentations (#10692)
koba04 Sep 26, 2017
e858ed5
Add changelog for 15.6.2
gaearon Sep 26, 2017
9f8387a
Add 15.6.2 blog post to master
gaearon Sep 26, 2017
4de45cf
Add Nate to authors on master
gaearon Sep 26, 2017
ec75ad1
Bump object-assign patch range to match main package.json
acdlite Sep 26, 2017
1fcdc02
Flow should ignore node_modules/create-react-class
acdlite Sep 26, 2017
7ccfbfc
Update error codes
acdlite Sep 26, 2017
b62d315
Update CHANGELOG for React 16
acdlite Sep 26, 2017
5c6ef40
v16.0.0
acdlite Sep 26, 2017
5f6326f
Doc updates for React 16 + blog post (#10824)
acdlite Sep 26, 2017
893919f
Fix React links on the website (#10837)
gaearon Sep 26, 2017
5120bf8
Doc change for prevContext removal in CDU (#10836)
STRML Sep 26, 2017
26cf268
Fix note formatting
gaearon Sep 26, 2017
ba1396f
React.createPortal is not a function (#10843)
kaylee42 Sep 26, 2017
0479959
Update Portals Documentation (#10840)
SavePointSam Sep 26, 2017
8b39991
Update name of property initializer proposal (#10812)
karlhorky Sep 26, 2017
706d2f4
Fix portal link (#10845)
acdlite Sep 26, 2017
138634f
Update docs for React 16 (#10846)
gaearon Sep 26, 2017
9ce135f
Minor doc edit
gaearon Sep 26, 2017
0af28ea
Merge remote-tracking branch 'origin/master' into gatsby
acdlite Sep 26, 2017
9fce9a2
Rename urls
acdlite Sep 26, 2017
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
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<PROJECT_ROOT>/node_modules/chrome-devtools-frontend/.*
<PROJECT_ROOT>/node_modules/devtools-timeline-model/.*
<PROJECT_ROOT>/www/node_modules/.*
<PROJECT_ROOT>/node_modules/create-react-class/.*
<PROJECT_ROOT>/.*/__mocks__/.*
<PROJECT_ROOT>/.*/__tests__/.*

Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
Click to see more.
</summary>

No unreleased changes yet.

</details>

## 16.0.0 (September 26, 2017)

### New JS Environment Requirements

* React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set), as well as [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame). If you support older browsers and devices which may not yet provide these natively (e.g. <IE11), [you may want to include a polyfill](https://gist.github.com/gaearon/9a4d54653ae9c50af6c54b4e0e56b583).
Expand Down Expand Up @@ -47,8 +53,6 @@
- There is no `react-with-addons.js` build anymore. All compatible addons are published separately on npm, and have single-file browser versions if you need them.
- The deprecations introduced in 15.x have been removed from the core package. `React.createClass` is now available as create-react-class, `React.PropTypes` as prop-types, `React.DOM` as react-dom-factories, react-addons-test-utils as react-dom/test-utils, and shallow renderer as react-test-renderer/shallow. See [15.5.0](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html) and [15.6.0](https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html) blog posts for instructions on migrating code and automated codemods.

</details>

## 15.6.2 (September 25, 2017)

### All Packages
Expand Down
2 changes: 1 addition & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ sass:
gems:
- jekyll-redirect-from
- jekyll-paginate
react_version: 15.4.0
react_version: 16.0.0
react_hashes:
dev: buVLzxzBI8Ps3svVMSUurNdb5dozNidH5Ow4H0YgZeia3t6Oeui2VLpvtAq1fwtK
prod: nCjsa0kjNQPQdxWm12/ReVJzfBJaVubEwwDswyQDGMKYJmeWv3qShMuETfU5fisu
Expand Down
6 changes: 4 additions & 2 deletions docs/_data/nav_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
title: Reconciliation
- id: context
title: Context
- id: portals
title: Portals
- id: web-components
title: Web Components
- id: higher-order-components
Expand All @@ -65,8 +67,6 @@
title: ReactDOM
- id: react-dom-server
title: ReactDOMServer
- id: react-dom-node-stream
title: ReactDOMNodeStream
- id: dom-elements
title: DOM Elements
- id: events
Expand All @@ -77,3 +77,5 @@
title: Shallow Renderer
- id: test-renderer
title: Test Renderer
- id: javascript-environment-requirements
title: JS Environment Requirements
4 changes: 2 additions & 2 deletions docs/_js/live_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var IS_MOBILE = (
|| navigator.userAgent.match(/Windows Phone/i)
);

var CodeMirrorEditor = React.createClass({
var CodeMirrorEditor = createReactClass({
propTypes: {
lineNumbers: PropTypes.bool,
onChange: PropTypes.func,
Expand Down Expand Up @@ -74,7 +74,7 @@ var selfCleaningTimeout = {
},
};

var ReactPlayground = React.createClass({
var ReactPlayground = createReactClass({
mixins: [selfCleaningTimeout],

MODES: {JSX: 'JSX', JS: 'JS'}, //keyMirror({JSX: true, JS: true}),
Expand Down
5 changes: 3 additions & 2 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
<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/prop-types/prop-types.min.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/react/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/create-react-class/create-react-class.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>
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2013-06-05-why-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ to render views, which we see as an advantage over templates for a few reasons:
**no manual string concatenation** and therefore less surface area for XSS
vulnerabilities.

We've also created [JSX](/react/docs/jsx-in-depth.html), an optional syntax
We've also created [JSX](/docs/jsx-in-depth.html), an optional syntax
extension, in case you prefer the readability of HTML to raw JavaScript.

## Reactive updates are dead simple.
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2013-06-12-community-roundup.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outsid

## Origins of React

[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/react/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:
[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:

> React isn't quite like any other popular JavaScript libraries, and it solves a very specific problem: complex UI rendering. It's also intended to be used along side many other popular libraries. For example, React works well with Backbone.js, amongst many others.
>
Expand Down
8 changes: 4 additions & 4 deletions docs/_posts/2013-06-19-community-roundup-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v

Many of you pointed out differences between JSX and HTML. In order to clear up some confusion, we have added some documentation that covers the four main differences:

- [Whitespace removal](/react/docs/jsx-is-not-html.html)
- [HTML Entities](/react/docs/jsx-is-not-html.html)
- [Comments](/react/docs/jsx-is-not-html.html)
- [Custom HTML Attributes](/react/docs/jsx-is-not-html.html)
- [Whitespace removal](/docs/jsx-is-not-html.html)
- [HTML Entities](/docs/jsx-is-not-html.html)
- [Comments](/docs/jsx-is-not-html.html)
- [Custom HTML Attributes](/docs/jsx-is-not-html.html)
2 changes: 1 addition & 1 deletion docs/_posts/2013-07-03-community-roundup-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The best part is the demo of how React reconciliation process makes live editing

## React Snippets

Over the past several weeks, members of our team, [Pete Hunt](http://www.petehunt.net/) and [Paul O'Shannessy](http://zpao.com/), answered many questions that were asked in the [React group](https://groups.google.com/forum/#!forum/reactjs). They give a good overview of how to integrate React with other libraries and APIs through the use of [Mixins](/react/docs/reusable-components.html) and [Lifecycle Methods](/react/docs/working-with-the-browser.html).
Over the past several weeks, members of our team, [Pete Hunt](http://www.petehunt.net/) and [Paul O'Shannessy](http://zpao.com/), answered many questions that were asked in the [React group](https://groups.google.com/forum/#!forum/reactjs). They give a good overview of how to integrate React with other libraries and APIs through the use of [Mixins](/docs/reusable-components.html) and [Lifecycle Methods](/docs/working-with-the-browser.html).

> [Listening Scroll Event](https://groups.google.com/forum/#!topic/reactjs/l6PnP8qbofk)
>
Expand Down
8 changes: 4 additions & 4 deletions docs/_posts/2013-07-17-react-v0-4-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ When you're ready, [go download it](/react/downloads.html)!
* Switch from using `id` attribute to `data-reactid` to track DOM nodes. This allows you to integrate with other JS and CSS libraries more easily.
* Support for more DOM elements and attributes (e.g., `<canvas>`)
* Improved server-side rendering APIs. `React.renderComponentToString(<component>, callback)` allows you to use React on the server and generate markup which can be sent down to the browser.
* `prop` improvements: validation and default values. [Read our blog post for details...](/react/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](/react/docs/multiple-components.html)
* Removed `React.autoBind`. [Read our blog post for details...](/react/blog/2013/07/02/react-v0-4-autobind-by-default.html)
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](/react/docs/forms.html)
* `prop` improvements: validation and default values. [Read our blog post for details...](/blog/2013/07/11/react-v0-4-prop-validation-and-default-values.html)
* Support for the `key` prop, which allows for finer control over reconciliation. [Read the docs for details...](/docs/multiple-components.html)
* Removed `React.autoBind`. [Read our blog post for details...](/blog/2013/07/02/react-v0-4-autobind-by-default.html)
* Improvements to forms. We've written wrappers around `<input>`, `<textarea>`, `<option>`, and `<select>` in order to standardize many inconsistencies in browser implementations. This includes support for `defaultValue`, and improved implementation of the `onChange` event, and circuit completion. [Read the docs for details...](/docs/forms.html)
* We've implemented an improved synthetic event system that conforms to the W3C spec.
* Updates to your component are batched now, which may result in a significantly faster re-render of components. `this.setState` now takes an optional callback as its second parameter. If you were using `onClick={this.setState.bind(this, state)}` previously, you'll want to make sure you add a third parameter so that the event is not treated as the callback.

Expand Down
24 changes: 12 additions & 12 deletions docs/_posts/2013-07-23-community-roundup-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ React.renderComponent(

> Guides
>
> * [Why React?](/react/docs/why-react.html)
> * [Displaying Data](/react/docs/displaying-data.html)
> * [JSX in Depth](/react/docs/jsx-in-depth.html)
> * [JSX Gotchas](/react/docs/jsx-gotchas.html)
> * [Interactivity and Dynamic UIs](/react/docs/interactivity-and-dynamic-uis.html)
> * [Multiple Components](/react/docs/multiple-components.html)
> * [Reusable Components](/react/docs/reusable-components.html)
> * [Forms](/react/docs/forms.html)
> * [Working With the Browser](/react/docs/working-with-the-browser.html)
> * [More About Refs](/react/docs/more-about-refs.html)
> * [Tooling integration](/react/docs/tooling-integration.html)
> * [Reference](/react/docs/top-level-api.html)
> * [Why React?](/docs/why-react.html)
> * [Displaying Data](/docs/displaying-data.html)
> * [JSX in Depth](/docs/jsx-in-depth.html)
> * [JSX Gotchas](/docs/jsx-gotchas.html)
> * [Interactivity and Dynamic UIs](/docs/interactivity-and-dynamic-uis.html)
> * [Multiple Components](/docs/multiple-components.html)
> * [Reusable Components](/docs/reusable-components.html)
> * [Forms](/docs/forms.html)
> * [Working With the Browser](/docs/working-with-the-browser.html)
> * [More About Refs](/docs/more-about-refs.html)
> * [Tooling integration](/docs/tooling-integration.html)
> * [Reference](/docs/top-level-api.html)
2 changes: 1 addition & 1 deletion docs/_posts/2013-08-26-community-roundup-7.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It's been three months since we open sourced React and it is going well. Some st
* [226 posts on Google Group](https://groups.google.com/forum/#!forum/reactjs)
* [76 GitHub projects using React](https://gist.github.com/vjeux/6335762)
* [30 contributors](https://github.com/facebook/react/graphs/contributors)
* [15 blog posts](/react/blog/)
* [15 blog posts](/blog/)
* 2 early adopters: [Khan Academy](http://sophiebits.com/2013/06/09/using-react-to-speed-up-khan-academy.html) and [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/)


Expand Down
4 changes: 2 additions & 2 deletions docs/_posts/2013-10-16-react-v0.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This release is the result of several months of hard work from members of the te

The biggest change you'll notice as a developer is that we no longer support `class` in JSX as a way to provide CSS classes. Since this prop was being converted to `className` at the transform step, it caused some confusion when trying to access it in composite components. As a result we decided to make our DOM properties mirror their counterparts in the JS DOM API. There are [a few exceptions](https://github.com/facebook/react/blob/master/src/dom/DefaultDOMPropertyConfig.js#L156) where we deviate slightly in an attempt to be consistent internally.

The other major change in v0.5 is that we've added an additional build - `react-with-addons` - which adds support for some extras that we've been working on including animations and two-way binding. [Read more about these addons in the docs](/react/docs/addons.html).
The other major change in v0.5 is that we've added an additional build - `react-with-addons` - which adds support for some extras that we've been working on including animations and two-way binding. [Read more about these addons in the docs](/docs/addons.html).

## Thanks to Our Community

Expand Down Expand Up @@ -41,7 +41,7 @@ It's been awesome to see the things that people are building with React, and we

### React with Addons (New!)

* Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](/react/docs/addons.html).
* Introduced a separate build with several "addons" which we think can help improve the React experience. We plan to deprecate this in the long-term, instead shipping each as standalone pieces. [Read more in the docs](/docs/addons.html).

### JSX

Expand Down
8 changes: 4 additions & 4 deletions docs/_posts/2013-12-23-community-roundup-12.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: "Community Round-up #12"
author: [vjeux]
---

React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the [docs](/react/docs/getting-started.html) and do not hesitate to ask questions on the [Google Group](https://groups.google.com/group/reactjs), [IRC](irc://chat.freenode.net/reactjs) or [Stack Overflow](http://stackoverflow.com/questions/tagged/reactjs). We are trying our best to help you out!
React got featured on the front-page of Hacker News thanks to the Om library. If you try it out for the first time, take a look at the [docs](/docs/getting-started.html) and do not hesitate to ask questions on the [Google Group](https://groups.google.com/group/reactjs), [IRC](irc://chat.freenode.net/reactjs) or [Stack Overflow](http://stackoverflow.com/questions/tagged/reactjs). We are trying our best to help you out!

## The Future of JavaScript MVC

[David Nolen](https://swannodette.github.io/) announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient [shouldComponentUpdate](/react/docs/component-specs.html#updating-shouldcomponentupdate) and get huge performance improvements on some tasks.
[David Nolen](https://swannodette.github.io/) announced Om, a thin wrapper on-top of React in ClojureScript. It stands out by only using immutable data structures. This unlocks the ability to write a very efficient [shouldComponentUpdate](/docs/component-specs.html#updating-shouldcomponentupdate) and get huge performance improvements on some tasks.

> We've known this for some time over here in the ClojureScript corner of the world - all of our collections are immutable and modeled directly on the original Clojure versions written in Java. Modern JavaScript engines have now been tuned to the point that it's no longer uncommon to see collection performance within 2.5X of the Java Virtual Machine.
>
Expand All @@ -22,7 +22,7 @@ React got featured on the front-page of Hacker News thanks to the Om library. If

## Scroll Position with React

Managing the scroll position when new content is inserted is usually very tricky to get right. [Vjeux](http://blog.vjeux.com/) discovered that [componentWillUpdate](/react/docs/component-specs.html#updating-componentwillupdate) and [componentDidUpdate](/react/docs/component-specs.html#updating-componentdidupdate) were triggered exactly at the right time to manage the scroll position.
Managing the scroll position when new content is inserted is usually very tricky to get right. [Vjeux](http://blog.vjeux.com/) discovered that [componentWillUpdate](/docs/component-specs.html#updating-componentwillupdate) and [componentDidUpdate](/docs/component-specs.html#updating-componentdidupdate) were triggered exactly at the right time to manage the scroll position.

> We can check the scroll position before the component has updated with componentWillUpdate and scroll if necessary at componentDidUpdate
>
Expand All @@ -45,7 +45,7 @@ Managing the scroll position when new content is inserted is usually very tricky

## Lights Out

React declarative approach is well suited to write games. [Cheng Lou](https://github.com/chenglou) wrote the famous Lights Out game in React. It's a good example of use of [TransitionGroup](/react/docs/animation.html) to implement animations.
React declarative approach is well suited to write games. [Cheng Lou](https://github.com/chenglou) wrote the famous Lights Out game in React. It's a good example of use of [TransitionGroup](/docs/animation.html) to implement animations.
<figure><a href="https://chenglou.github.io/react-lights-out/"><img src="../img/blog/lights-out.png"></a></figure>

[Try it out!](https://chenglou.github.io/react-lights-out/)
Expand Down
2 changes: 1 addition & 1 deletion docs/_posts/2014-02-20-react-v0.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We've also published version `0.9.0` of the `react` and `react-tools` packages o

This version includes better support for normalizing event properties across all supported browsers so that you need to worry even less about cross-browser differences. We've also made many improvements to error messages and have refactored the core to never rethrow errors, so stack traces are more accurate and Chrome's purple break-on-error stop sign now works properly.

We've also added to the add-ons build [React.addons.TestUtils](/react/docs/test-utils.html), a set of new utilities to help you write unit tests for React components. You can now simulate events on your components, and several helpers are provided to help make assertions about the rendered DOM tree.
We've also added to the add-ons build [React.addons.TestUtils](/docs/test-utils.html), a set of new utilities to help you write unit tests for React components. You can now simulate events on your components, and several helpers are provided to help make assertions about the rendered DOM tree.

We've also made several other improvements and a few breaking changes; the full changelog is provided below.

Expand Down
Loading