diff --git a/CHANGELOG.md b/CHANGELOG.md index 3041d39fbb331..4df4e797bf2c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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`. @@ -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 diff --git a/src/isomorphic/children/ReactChildren.js b/src/isomorphic/children/ReactChildren.js index 75670dbe36002..bf53fea8b67ad 100644 --- a/src/isomorphic/children/ReactChildren.js +++ b/src/isomorphic/children/ReactChildren.js @@ -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. @@ -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. @@ -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. @@ -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 = []; diff --git a/src/isomorphic/children/onlyChild.js b/src/isomorphic/children/onlyChild.js index 43ec44f29ca75..4d7d481819cf6 100644 --- a/src/isomorphic/children/onlyChild.js +++ b/src/isomorphic/children/onlyChild.js @@ -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 diff --git a/src/isomorphic/classic/class/ReactClass.js b/src/isomorphic/classic/class/ReactClass.js index f880e579a060a..475f08d7d81b2 100644 --- a/src/isomorphic/classic/class/ReactClass.js +++ b/src/isomorphic/classic/class/ReactClass.js @@ -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. diff --git a/src/isomorphic/classic/element/ReactElement.js b/src/isomorphic/classic/element/ReactElement.js index 90080c7ff8db5..eb322debea47c 100644 --- a/src/isomorphic/classic/element/ReactElement.js +++ b/src/isomorphic/classic/element/ReactElement.js @@ -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; @@ -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); @@ -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; @@ -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 diff --git a/src/renderers/dom/client/ReactMount.js b/src/renderers/dom/client/ReactMount.js index 4c9a77f8c7dbe..24af956c2fa85 100644 --- a/src/renderers/dom/client/ReactMount.js +++ b/src/renderers/dom/client/ReactMount.js @@ -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 @@ -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 diff --git a/src/renderers/dom/client/findDOMNode.js b/src/renderers/dom/client/findDOMNode.js index 238b5938d472f..4445705b321c9 100644 --- a/src/renderers/dom/client/findDOMNode.js +++ b/src/renderers/dom/client/findDOMNode.js @@ -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. diff --git a/src/renderers/dom/server/ReactServerRendering.js b/src/renderers/dom/server/ReactServerRendering.js index ea4d8d9db452b..bd253cee5534f 100644 --- a/src/renderers/dom/server/ReactServerRendering.js +++ b/src/renderers/dom/server/ReactServerRendering.js @@ -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( @@ -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(