Skip to content

Commit a24d210

Browse files
committed
Improve quality of React.DOM deprecation warning comment
1 parent e5bb648 commit a24d210

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

scripts/fiber/tests-passing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
4040

4141
src/addons/__tests__/ReactDOMFactories-test.js
4242
* allow factories to be called without warnings
43+
* warns once when accessing React.DOM methods
4344

4445
src/addons/__tests__/ReactFragment-test.js
4546
* warns for numeric keys on objects as children

src/isomorphic/React.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ var React = {
9191
};
9292

9393
if (__DEV__) {
94-
// React.DOM factories are deprecated, set up a Proxy to listen for
95-
// accesses to this namespace and alert users to switch to the
96-
// associated addon.
94+
// React.DOM factories are deprecated. Set up a Proxy to listen for
95+
// accesses to the React.DOM namespace and alert users to switch to
96+
// the `react-addons-dom-factories` package.
9797
if (typeof Proxy === 'function') {
9898
var hasWarnedOfFactories = false;
9999

@@ -102,8 +102,8 @@ if (__DEV__) {
102102
if (!hasWarnedOfFactories) {
103103
warning(
104104
false,
105-
'Accessing React.DOM factories (like `React.DOM.%s`) is deprecated ' +
106-
'and will be removed in the future. Please use the ' +
105+
'Accessing factories like React.DOM.%s has been deprecated ' +
106+
'and will be removed in the future. Use the ' +
107107
'react-addons-dom-factories package instead.',
108108
name
109109
);

0 commit comments

Comments
 (0)