Fix: updated with new docs links (#8049)
Avinash Kondeti committed
Oct 23, 2016 at 02:23 UTC
6810627a91f2020caee7fecf21580187dc6ef0fc
8 files changed
+17
-17
CHANGELOG.md
+2
-2
@@ -388,7 +388,7 @@ Each of these changes will continue to work as before with a new warning until t
388
389
- `React.initializeTouchEvents` is no longer necessary and has been removed completely. Touch events now work automatically.
390
- 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.
391
-- 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.
391
+- 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.
392
- 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.
393
- Add-Ons: `classSet` has been removed. Use [classnames](https://github.com/JedWatson/classnames) instead.
394
- 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
399
- `setProps` and `replaceProps` are now deprecated. Instead, call ReactDOM.render again at the top level with the new props.
400
- 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.
401
- Reusing and mutating a `style` object between renders has been deprecated. This mirrors our change to freeze the `props` object.
402
-- 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).
402
+- 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).
403
- 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}`.
404
405
### Notable enhancements
src/isomorphic/children/ReactChildren.js
+4
-4
@@ -55,7 +55,7 @@ function forEachSingleChild(bookKeeping, child, name) {
55
/**
56
* Iterates through children that are typically specified as `props.children`.
57
*
58
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
58
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach
59
*
60
* The provided forEachFunc(child, index) will be called for each
61
* leaf child.
@@ -148,7 +148,7 @@ function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
148
/**
149
* Maps children that are typically specified as `props.children`.
150
*
151
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
151
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.map
152
*
153
* The provided mapFunction(child, key, index) will be called for each
154
* leaf child.
@@ -177,7 +177,7 @@ function forEachSingleChildDummy(traverseContext, child, name) {
177
* Count the number of children that are typically specified as
178
* `props.children`.
179
*
180
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
180
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.count
181
*
182
* @param {?*} children Children tree container.
183
* @return {number} The number of children.
@@ -191,7 +191,7 @@ function countChildren(children, context) {
191
* Flatten a children object (typically specified as `props.children`) and
192
* return an array with appropriately re-keyed children.
193
*
194
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
194
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray
195
*/
196
function toArray(children) {
197
var result = [];
src/isomorphic/children/onlyChild.js
+1
-1
@@ -18,7 +18,7 @@ var invariant = require('invariant');
18
* Returns the first child in a collection of children and verifies that there
19
* is only one child in the collection.
20
*
21
- * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
21
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.only
22
*
23
* The current implementation of this function assumes that a single child gets
24
* passed without a wrapper, but the purpose of this helper function is to
src/isomorphic/classic/class/ReactClass.js
+1
-1
@@ -761,7 +761,7 @@ var ReactClass = {
761
762
/**
763
* Creates a composite component class given a class specification.
764
- * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
764
+ * See https://facebook.github.io/react/docs/react-api.html#createclass
765
*
766
* @param {object} spec Class specification (which must define `render`).
767
* @return {function} Component constructor function.
src/isomorphic/classic/element/ReactElement.js
+4
-4
@@ -178,7 +178,7 @@ var ReactElement = function(type, key, ref, self, source, owner, props) {
178
179
/**
180
* Create and return a new ReactElement of the given type.
181
- * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
181
+ * See https://facebook.github.io/react/docs/react-api.html#createelement
182
*/
183
ReactElement.createElement = function(type, config, children) {
184
var propName;
@@ -266,7 +266,7 @@ ReactElement.createElement = function(type, config, children) {
266
267
/**
268
* Return a function that produces ReactElements of a given type.
269
- * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
269
+ * See https://facebook.github.io/react/docs/react-api.html#createfactory
270
*/
271
ReactElement.createFactory = function(type) {
272
var factory = ReactElement.createElement.bind(null, type);
@@ -295,7 +295,7 @@ ReactElement.cloneAndReplaceKey = function(oldElement, newKey) {
295
296
/**
297
* Clone and return a new ReactElement using element as the starting point.
298
- * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
298
+ * See https://facebook.github.io/react/docs/react-api.html#cloneelement
299
*/
300
ReactElement.cloneElement = function(element, config, children) {
301
var propName;
@@ -370,7 +370,7 @@ ReactElement.cloneElement = function(element, config, children) {
370
371
/**
372
* Verifies the object is a ReactElement.
373
- * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
373
+ * See https://facebook.github.io/react/docs/react-api.html#isvalidelement
374
* @param {?object} object
375
* @return {boolean} True if `object` is a valid component.
376
* @final
src/renderers/dom/client/ReactMount.js
+2
-2
@@ -540,7 +540,7 @@ var ReactMount = {
540
541
/**
542
* Renders a React component into the DOM in the supplied `container`.
543
- * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render
543
+ * See https://facebook.github.io/react/docs/react-dom.html#render
544
*
545
* If the React component was previously rendered into `container`, this will
546
* perform an update on it and only mutate the DOM as necessary to reflect the
@@ -557,7 +557,7 @@ var ReactMount = {
557
558
/**
559
* Unmounts and destroys the React component rendered in the `container`.
560
- * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode
560
+ * See https://facebook.github.io/react/docs/react-dom.html#unmountcomponentatnode
561
*
562
* @param {DOMElement} container DOM element containing a React component.
563
* @return {boolean} True if a component was found in and unmounted from
src/renderers/dom/client/findDOMNode.js
+1
-1
@@ -22,7 +22,7 @@ var warning = require('warning');
22
/**
23
* Returns the DOM node rendered by this element.
24
*
25
- * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode
25
+ * See https://facebook.github.io/react/docs/react-dom.html#finddomnode
26
*
27
* @param {ReactComponent|DOMElement} componentOrElement
28
* @return {?DOMElement} The root node of this element.
src/renderers/dom/server/ReactServerRendering.js
+2
-2
@@ -77,7 +77,7 @@ function renderToStringImpl(element, makeStaticMarkup) {
77
/**
78
* Render a ReactElement to its initial HTML. This should only be used on the
79
* server.
80
- * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostring
80
+ * See https://facebook.github.io/react/docs/react-dom-server.html#rendertostring
81
*/
82
function renderToString(element) {
83
invariant(
@@ -90,7 +90,7 @@ function renderToString(element) {
90
/**
91
* Similar to renderToString, except this doesn't create extra DOM attributes
92
* such as data-react-id that React uses internally.
93
- * See https://facebook.github.io/react/docs/top-level-api.html#reactdomserver.rendertostaticmarkup
93
+ * See https://facebook.github.io/react/docs/react-dom-server.html#rendertostaticmarkup
94
*/
95
function renderToStaticMarkup(element) {
96
invariant(