Skip to content
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ Each of these changes will continue to work as before with a new warning until t

- `React.initializeTouchEvents` is no longer necessary and has been removed completely. Touch events now work automatically.
- Add-Ons: Due to the DOM node refs change mentioned above, `TestUtils.findAllInRenderedTree` and related helpers are no longer able to take a DOM component, only a custom component.
- The `props` object is now frozen, so mutating props after creating a component element is no longer supported. In most cases, [`React.cloneElement`](https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement) should be used instead. This change makes your components easier to reason about and enables the compiler optimizations mentioned above.
- The `props` object is now frozen, so mutating props after creating a component element is no longer supported. In most cases, [`React.cloneElement`](https://facebook.github.io/react/docs/react-api.html#cloneelement) should be used instead. This change makes your components easier to reason about and enables the compiler optimizations mentioned above.
- Plain objects are no longer supported as React children; arrays should be used instead. You can use the [`createFragment`](https://facebook.github.io/react/docs/create-fragment.html) helper to migrate, which now returns an array.
- Add-Ons: `classSet` has been removed. Use [classnames](https://github.com/JedWatson/classnames) instead.
- Web components (custom elements) now use native property names. Eg: `class` instead of `className`.
Expand All @@ -399,7 +399,7 @@ Each of these changes will continue to work as before with a new warning until t
- `setProps` and `replaceProps` are now deprecated. Instead, call ReactDOM.render again at the top level with the new props.
- ES6 component classes must now extend `React.Component` in order to enable stateless function components. The [ES3 module pattern](https://facebook.github.io/react/blog/2015/01/27/react-v0.13.0-beta-1.html#other-languages) will continue to work.
- Reusing and mutating a `style` object between renders has been deprecated. This mirrors our change to freeze the `props` object.
- Add-Ons: `cloneWithProps` is now deprecated. Use [`React.cloneElement`](https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement) instead (unlike `cloneWithProps`, `cloneElement` does not merge `className` or `style` automatically; you can merge them manually if needed).
- Add-Ons: `cloneWithProps` is now deprecated. Use [`React.cloneElement`](https://facebook.github.io/react/docs/react-api.html#cloneelement) instead (unlike `cloneWithProps`, `cloneElement` does not merge `className` or `style` automatically; you can merge them manually if needed).
- Add-Ons: To improve reliability, `CSSTransitionGroup` will no longer listen to transition events. Instead, you should specify transition durations manually using props such as `transitionEnterTimeout={500}`.

### Notable enhancements
Expand Down
8 changes: 4 additions & 4 deletions src/isomorphic/children/ReactChildren.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function forEachSingleChild(bookKeeping, child, name) {
/**
* Iterates through children that are typically specified as `props.children`.
*
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
* See https://facebook.github.io/react/docs/react-api.html#react.children.foreach
*
* The provided forEachFunc(child, index) will be called for each
* leaf child.
Expand Down Expand Up @@ -148,7 +148,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
/**
* Maps children that are typically specified as `props.children`.
*
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
* See https://facebook.github.io/react/docs/react-api.html#react.children.map
*
* The provided mapFunction(child, key, index) will be called for each
* leaf child.
Expand Down Expand Up @@ -177,7 +177,7 @@ function forEachSingleChildDummy(traverseContext, child, name) {
* Count the number of children that are typically specified as
* `props.children`.
*
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
* See https://facebook.github.io/react/docs/react-api.html#react.children.count
*
* @param {?*} children Children tree container.
* @return {number} The number of children.
Expand All @@ -191,7 +191,7 @@ function countChildren(children, context) {
* Flatten a children object (typically specified as `props.children`) and
* return an array with appropriately re-keyed children.
*
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
* See https://facebook.github.io/react/docs/react-api.html#react.children.toarray
*/
function toArray(children) {
var result = [];
Expand Down
2 changes: 1 addition & 1 deletion src/isomorphic/children/onlyChild.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var invariant = require('invariant');
* Returns the first child in a collection of children and verifies that there
* is only one child in the collection.
*
* See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
* See https://facebook.github.io/react/docs/react-api.html#react.children.only
*
* The current implementation of this function assumes that a single child gets
* passed without a wrapper, but the purpose of this helper function is to
Expand Down
2 changes: 1 addition & 1 deletion src/isomorphic/classic/class/ReactClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ var ReactClass = {

/**
* Creates a composite component class given a class specification.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
* See https://facebook.github.io/react/docs/react-api.html#createclass
*
* @param {object} spec Class specification (which must define `render`).
* @return {function} Component constructor function.
Expand Down
8 changes: 4 additions & 4 deletions src/isomorphic/classic/element/ReactElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ var ReactElement = function(type, key, ref, self, source, owner, props) {

/**
* Create and return a new ReactElement of the given type.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
* See https://facebook.github.io/react/docs/react-api.html#createelement
*/
ReactElement.createElement = function(type, config, children) {
var propName;
Expand Down Expand Up @@ -266,7 +266,7 @@ ReactElement.createElement = function(type, config, children) {

/**
* Return a function that produces ReactElements of a given type.
* See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
* See https://facebook.github.io/react/docs/react-api.html#createfactory
*/
ReactElement.createFactory = function(type) {
var factory = ReactElement.createElement.bind(null, type);
Expand Down Expand Up @@ -295,7 +295,7 @@ ReactElement.cloneAndReplaceKey = function(oldElement, newKey) {

/**
* Clone and return a new ReactElement using element as the starting point.
* See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
* See https://facebook.github.io/react/docs/react-api.html#cloneelement
*/
ReactElement.cloneElement = function(element, config, children) {
var propName;
Expand Down Expand Up @@ -370,7 +370,7 @@ ReactElement.cloneElement = function(element, config, children) {

/**
* Verifies the object is a ReactElement.
* See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
* See https://facebook.github.io/react/docs/react-api.html#isvalidelement
* @param {?object} object
* @return {boolean} True if `object` is a valid component.
* @final
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/dom/client/ReactMount.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ var ReactMount = {

/**
* Renders a React component into the DOM in the supplied `container`.
* See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render
* See https://facebook.github.io/react/docs/react-dom.html#render
*
* If the React component was previously rendered into `container`, this will
* perform an update on it and only mutate the DOM as necessary to reflect the
Expand All @@ -557,7 +557,7 @@ var ReactMount = {

/**
* Unmounts and destroys the React component rendered in the `container`.
* See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode
* See https://facebook.github.io/react/docs/react-dom.html#unmountcomponentatnode
*
* @param {DOMElement} container DOM element containing a React component.
* @return {boolean} True if a component was found in and unmounted from
Expand Down
2 changes: 1 addition & 1 deletion src/renderers/dom/client/findDOMNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var warning = require('warning');
/**
* Returns the DOM node rendered by this element.
*
* See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode
* See https://facebook.github.io/react/docs/react-dom.html#finddomnode
*
* @param {ReactComponent|DOMElement} componentOrElement
* @return {?DOMElement} The root node of this element.
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/dom/server/ReactServerRendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function renderToStringImpl(element, makeStaticMarkup) {
/**
* Render a ReactElement to its initial HTML. This should only be used on the
* server.
* See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring
* See https://facebook.github.io/react/docs/react-dom-server.html#rendertostring
*/
function renderToString(element) {
invariant(
Expand All @@ -90,7 +90,7 @@ function renderToString(element) {
/**
* Similar to renderToString, except this doesn't create extra DOM attributes
* such as data-react-id that React uses internally.
* See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup
* See https://facebook.github.io/react/docs/react-dom-server.html#rendertostaticmarkup
*/
function renderToStaticMarkup(element) {
invariant(
Expand Down