Only freeze valid attributes in mountComponent

Reviewed By: spicyj

Differential Revision: D2939910

fb-gh-sync-id: 2efe6ecd6d888d4185a8cc74ba9adbe7c68bcd3b
shipit-source-id: 2efe6ecd6d888d4185a8cc74ba9adbe7c68bcd3b
This commit is contained in:
Matthew Dapena-Tretter
2016-03-01 15:13:35 +00:00
committed by Martin Konicek
parent 7e2c393f4e
commit 7f6d9d451d
@@ -185,7 +185,11 @@ ReactNativeBaseComponent.Mixin = {
var tag = ReactNativeTagHandles.allocateTag();
if (__DEV__) {
deepFreezeAndThrowOnMutationInDev(this._currentElement.props);
for (var key in this.viewConfig.validAttributes) {
if (this._currentElement.props.hasOwnProperty(key)) {
deepFreezeAndThrowOnMutationInDev(this._currentElement.props[key]);
}
}
}
var updatePayload = ReactNativeAttributePayload.create(