Skip to content

Commit

Permalink
Improve quality of React.DOM deprecation warning comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nhunzaker committed Jan 23, 2017
1 parent e5bb648 commit a24d210
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions scripts/fiber/tests-passing.txt
Expand Up @@ -40,6 +40,7 @@ src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js

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

src/addons/__tests__/ReactFragment-test.js
* warns for numeric keys on objects as children
Expand Down
10 changes: 5 additions & 5 deletions src/isomorphic/React.js
Expand Up @@ -91,9 +91,9 @@ var React = {
};

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

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

0 comments on commit a24d210

Please sign in to comment.