@samitouri / QOS-React-2 / commits / b038943653

Add deprecation note for deprecated component APIs

Paul O’Shannessy committed Mar 10, 2015 at 09:53 UTC b03894365381b6ee5a7effd09004fe29f499c257
1 file changed +16 -1
docs/docs/ref-02-component-api.md
+16 -1
@@ -38,6 +38,10 @@ replaceState(object nextState[, function callback])
38
39 Like `setState()` but deletes any pre-existing state keys that are not in nextState.
40
41 +> Note:
42 +>
43 +> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.
44 +
45
46 ### forceUpdate
47
@@ -63,6 +67,8 @@ If this component has been mounted into the DOM, this returns the corresponding
67 > Note:
68 >
69 > getDOMNode is deprecated and has been replaced with [React.findDOMNode()](/react/docs/top-level-api.html#react.finddomnode).
70 +>
71 +> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.
72
73
74 ### isMounted
@@ -73,6 +79,10 @@ bool isMounted()
79
80 `isMounted()` returns true if the component is rendered into the DOM, false otherwise. You can use this method to guard asynchronous calls to `setState()` or `forceUpdate()`.
81
82 +> Note:
83 +>
84 +> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.
85 +
86
87 ### setProps
88
@@ -89,7 +99,8 @@ Though calling `React.render()` again on the same node is the preferred way to u
99 > When possible, the declarative approach of calling `React.render()` again is preferred; it tends to make updates easier to reason about. (There's no significant performance difference between the two approaches.)
100 >
101 > This method can only be called on a root-level component. That is, it's only available on the component passed directly to `React.render()` and none of its children. If you're inclined to use `setProps()` on a child component, instead take advantage of reactive updates and pass the new prop to the child component when it's created in `render()`.
92 -
102 +>
103 +> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.
104
105 ### replaceProps
106
@@ -98,3 +109,7 @@ replaceProps(object nextProps[, function callback])
109 ```
110
111 Like `setProps()` but deletes any pre-existing props instead of merging the two objects.
112 +
113 +> Note:
114 +>
115 +> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.