React sync for revisions 467b103...a634e53

Reviewed By: flarnie

Differential Revision: D6965585

fbshipit-source-id: 48c20d0010f4daf83272a36b3bdaca94493ab8fa
This commit is contained in:
Brian Vaughn 2018-02-12 13:57:50 -08:00 коммит произвёл Facebook Github Bot
Родитель f7729a5933
Коммит bedaaa1419
4 изменённых файлов: 29 добавлений и 19 удалений

Просмотреть файл

@ -1 +1 @@
467b1034ce8af6807e11deb9dfeca4d4e922ed82
a634e53d2ff376366aa87815ad4de064494cd05e

Просмотреть файл

@ -3881,6 +3881,8 @@ var NativeMethodsMixin = {
!NativeMethodsMixin_DEV.UNSAFE_componentWillReceiveProps,
"Do not override existing functions."
);
// TODO (bvaughn) Remove cWM and cWRP in a future version of React Native,
// Once these lifecycles have been remove from the reconciler.
NativeMethodsMixin_DEV.componentWillMount = function() {
throwOnStylesProp(this, this.props);
};
@ -3893,6 +3895,12 @@ var NativeMethodsMixin = {
NativeMethodsMixin_DEV.UNSAFE_componentWillReceiveProps = function(newProps) {
throwOnStylesProp(this, newProps);
};
// React may warn about cWM/cWRP/cWU methods being deprecated.
// Add a flag to suppress these warnings for this special case.
// TODO (bvaughn) Remove this flag once the above methods have been removed.
NativeMethodsMixin_DEV.componentWillMount.__suppressDeprecationWarning = true;
NativeMethodsMixin_DEV.componentWillReceiveProps.__suppressDeprecationWarning = true;
}
function _classCallCheck$1(instance, Constructor) {
@ -6008,19 +6016,16 @@ var ReactStrictModeWarnings = {
}
// Don't warn about react-lifecycles-compat polyfilled components.
// Note that it is sufficient to check for the presence of a
// single lifecycle, componentWillMount, with the polyfill flag.
if (
typeof instance.componentWillMount === "function" &&
instance.componentWillMount.__suppressDeprecationWarning === true
instance.componentWillMount.__suppressDeprecationWarning !== true
) {
return;
}
if (typeof instance.componentWillMount === "function") {
pendingComponentWillMountWarnings.push(fiber);
}
if (typeof instance.componentWillReceiveProps === "function") {
if (
typeof instance.componentWillReceiveProps === "function" &&
instance.componentWillReceiveProps.__suppressDeprecationWarning !== true
) {
pendingComponentWillReceivePropsWarnings.push(fiber);
}
if (typeof instance.componentWillUpdate === "function") {

Просмотреть файл

@ -3881,6 +3881,8 @@ var NativeMethodsMixin = {
!NativeMethodsMixin_DEV.UNSAFE_componentWillReceiveProps,
"Do not override existing functions."
);
// TODO (bvaughn) Remove cWM and cWRP in a future version of React Native,
// Once these lifecycles have been remove from the reconciler.
NativeMethodsMixin_DEV.componentWillMount = function() {
throwOnStylesProp(this, this.props);
};
@ -3893,6 +3895,12 @@ var NativeMethodsMixin = {
NativeMethodsMixin_DEV.UNSAFE_componentWillReceiveProps = function(newProps) {
throwOnStylesProp(this, newProps);
};
// React may warn about cWM/cWRP/cWU methods being deprecated.
// Add a flag to suppress these warnings for this special case.
// TODO (bvaughn) Remove this flag once the above methods have been removed.
NativeMethodsMixin_DEV.componentWillMount.__suppressDeprecationWarning = true;
NativeMethodsMixin_DEV.componentWillReceiveProps.__suppressDeprecationWarning = true;
}
function _classCallCheck$1(instance, Constructor) {
@ -5919,19 +5927,16 @@ var ReactStrictModeWarnings = {
}
// Don't warn about react-lifecycles-compat polyfilled components.
// Note that it is sufficient to check for the presence of a
// single lifecycle, componentWillMount, with the polyfill flag.
if (
typeof instance.componentWillMount === "function" &&
instance.componentWillMount.__suppressDeprecationWarning === true
instance.componentWillMount.__suppressDeprecationWarning !== true
) {
return;
}
if (typeof instance.componentWillMount === "function") {
pendingComponentWillMountWarnings.push(fiber);
}
if (typeof instance.componentWillReceiveProps === "function") {
if (
typeof instance.componentWillReceiveProps === "function" &&
instance.componentWillReceiveProps.__suppressDeprecationWarning !== true
) {
pendingComponentWillReceivePropsWarnings.push(fiber);
}
if (typeof instance.componentWillUpdate === "function") {

Просмотреть файл

@ -219,8 +219,8 @@
"jest": "22.2.1",
"jest-junit": "3.5.0",
"prettier": "1.9.1",
"react": "^16.3.0-alpha.0",
"react-test-renderer": "^16.3.0-alpha.0",
"react": "^16.3.0-alpha.1",
"react-test-renderer": "^16.3.0-alpha.1",
"shelljs": "^0.7.8",
"sinon": "^2.2.0"
}