Increase severity of setprops and replaceprops deprecations, since their removal is now imminent.
jim committed
Dec 2, 2015 at 19:21 UTC
8c7603311a85739d4f5b42cf05266f63469d0203
1 file changed
+3
-3
docs/docs/ref-02-component-api.md
+3
-3
@@ -124,11 +124,11 @@ Calling `setProps()` on a root-level component will change its properties and tr
124
125
> Note:
126
>
127
+> This method is deprecated and will be removed soon. This method is not available on ES6 `class` components that extend `React.Component`. Instead of calling `setProps`, try invoking ReactDOM.render() again with the new props. For additional notes, see our [blog post about using the Top Level API](/react/blog/2015/10/01/react-render-and-top-level-api.html)
128
+>
129
> When possible, the declarative approach of calling `ReactDOM.render()` again on the same node is preferred instead. It tends to make updates easier to reason about. (There's no significant performance difference between the two approaches.)
130
>
131
> This method can only be called on a root-level component. That is, it's only available on the component passed directly to `ReactDOM.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()`.
130
->
131
-> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.
132
133
### replaceProps
134
@@ -143,4 +143,4 @@ Like `setProps()` but deletes any pre-existing props instead of merging the two
143
144
> Note:
145
>
146
-> This method is not available on ES6 `class` components that extend `React.Component`. It may be removed entirely in a future version of React.
146
+> This method is deprecated and will be removed soon. This method is not available on ES6 `class` components that extend `React.Component`. Instead of calling `replaceProps`, try invoking ReactDOM.render() again with the new props. For additional notes, see our [blog post about using the Top Level API](/react/blog/2015/10/01/react-render-and-top-level-api.html)
\ No newline at end of file