mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Wordsmithing deprecation notices (and adding fb.me links)
This commit is contained in:
+12
-5
@@ -106,8 +106,11 @@ if (__DEV__) {
|
|||||||
get() {
|
get() {
|
||||||
warning(
|
warning(
|
||||||
warnedForCheckPropTypes,
|
warnedForCheckPropTypes,
|
||||||
'checkPropTypes has moved out of the react package. ' +
|
'checkPropTypes have been moved to a separate package. ' +
|
||||||
'Use the prop-types package from npm instead.',
|
'Accessing React.checkPropTypes is no longer supported, ' +
|
||||||
|
'and will be removed completely in React 16. ' +
|
||||||
|
'Use the prop-types package on npm instead. ' +
|
||||||
|
'(https://fb.me/migrating-from-react-proptypes)',
|
||||||
);
|
);
|
||||||
warnedForCheckPropTypes = true;
|
warnedForCheckPropTypes = true;
|
||||||
return ReactPropTypes;
|
return ReactPropTypes;
|
||||||
@@ -121,7 +124,8 @@ if (__DEV__) {
|
|||||||
'React.createClass is no longer supported. Use a plain JavaScript ' +
|
'React.createClass is no longer supported. Use a plain JavaScript ' +
|
||||||
"class instead. If you're not yet ready to migrate, " +
|
"class instead. If you're not yet ready to migrate, " +
|
||||||
'create-react-class is available on npm as a temporary, ' +
|
'create-react-class is available on npm as a temporary, ' +
|
||||||
'drop-in replacement.',
|
'drop-in replacement. ' +
|
||||||
|
'(https://fb.me/migrating-from-react-create-class)',
|
||||||
);
|
);
|
||||||
warnedForCreateClass = true;
|
warnedForCreateClass = true;
|
||||||
return createReactClass;
|
return createReactClass;
|
||||||
@@ -132,8 +136,11 @@ if (__DEV__) {
|
|||||||
get() {
|
get() {
|
||||||
warning(
|
warning(
|
||||||
warnedForPropTypes,
|
warnedForPropTypes,
|
||||||
'PropTypes have moved out of the react package. ' +
|
'PropTypes have been moved to a separate package. ' +
|
||||||
'Use the prop-types package from npm instead.',
|
'Accessing React.PropTypes is no longer supported, ' +
|
||||||
|
'and will be removed completely in React 16. ' +
|
||||||
|
'Use the prop-types package on npm instead. ' +
|
||||||
|
'(https://fb.me/migrating-from-react-proptypes)',
|
||||||
);
|
);
|
||||||
warnedForPropTypes = true;
|
warnedForPropTypes = true;
|
||||||
return ReactPropTypes;
|
return ReactPropTypes;
|
||||||
|
|||||||
@@ -35,10 +35,11 @@ describe('React', () => {
|
|||||||
expect(createClass).not.toBe(undefined);
|
expect(createClass).not.toBe(undefined);
|
||||||
expectDev(console.error.calls.count()).toBe(1);
|
expectDev(console.error.calls.count()).toBe(1);
|
||||||
expectDev(console.error.calls.argsFor(0)[0]).toContain(
|
expectDev(console.error.calls.argsFor(0)[0]).toContain(
|
||||||
'React.createClass is no longer supported. Use a plain ' +
|
'React.createClass is no longer supported. Use a plain JavaScript ' +
|
||||||
"JavaScript class instead. If you're not yet ready to migrate, " +
|
"class instead. If you're not yet ready to migrate, " +
|
||||||
'create-react-class is available on npm as a temporary, ' +
|
'create-react-class is available on npm as a temporary, ' +
|
||||||
'drop-in replacement.',
|
'drop-in replacement. ' +
|
||||||
|
'(https://fb.me/migrating-from-react-create-class)',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -49,8 +50,11 @@ describe('React', () => {
|
|||||||
expect(PropTypes).not.toBe(undefined);
|
expect(PropTypes).not.toBe(undefined);
|
||||||
expectDev(console.error.calls.count()).toBe(1);
|
expectDev(console.error.calls.count()).toBe(1);
|
||||||
expectDev(console.error.calls.argsFor(0)[0]).toContain(
|
expectDev(console.error.calls.argsFor(0)[0]).toContain(
|
||||||
'PropTypes have moved out of the react package. ' +
|
'PropTypes have been moved to a separate package. ' +
|
||||||
'Use the prop-types package from npm instead.',
|
'Accessing React.PropTypes is no longer supported, ' +
|
||||||
|
'and will be removed completely in React 16. ' +
|
||||||
|
'Use the prop-types package on npm instead. ' +
|
||||||
|
'(https://fb.me/migrating-from-react-proptypes)',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -61,8 +65,11 @@ describe('React', () => {
|
|||||||
expect(checkPropTypes).not.toBe(undefined);
|
expect(checkPropTypes).not.toBe(undefined);
|
||||||
expectDev(console.error.calls.count()).toBe(1);
|
expectDev(console.error.calls.count()).toBe(1);
|
||||||
expectDev(console.error.calls.argsFor(0)[0]).toContain(
|
expectDev(console.error.calls.argsFor(0)[0]).toContain(
|
||||||
'checkPropTypes has moved out of the react package. ' +
|
'checkPropTypes have been moved to a separate package. ' +
|
||||||
'Use the prop-types package from npm instead.',
|
'Accessing React.checkPropTypes is no longer supported, ' +
|
||||||
|
'and will be removed completely in React 16. ' +
|
||||||
|
'Use the prop-types package on npm instead. ' +
|
||||||
|
'(https://fb.me/migrating-from-react-proptypes)',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user