From 36d8ce8fabdd770cf455b07ee8e7c6880fadc57f Mon Sep 17 00:00:00 2001 From: CommitSyncScript Date: Thu, 6 Jun 2013 14:30:52 -0700 Subject: [PATCH] [React] remove deprecated Component.update() Summary: Since grepping for `update` and `updateAll` is pretty hard, I had these these functions call through but complain loudly. This noisy call through has been in prod for over a week and I haven't heard any complains, so let's take it out altogether. --- src/core/ReactComponent.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/core/ReactComponent.js b/src/core/ReactComponent.js index bc3769df92..e59c37fd69 100644 --- a/src/core/ReactComponent.js +++ b/src/core/ReactComponent.js @@ -480,24 +480,4 @@ var ReactComponent = { }; -function logDeprecated(msg) { - if (__DEV__) { - throw new Error(msg); - } else { - console && console.warn && console.warn(msg); - } -} - -/** - * @deprecated - */ -ReactComponent.Mixin.update = function(props) { - logDeprecated('this.update() is deprecated. Use this.setProps()'); - this.setProps(props); -}; -ReactComponent.Mixin.updateAll = function(props) { - logDeprecated('this.updateAll() is deprecated. Use this.replaceProps()'); - this.replaceProps(props); -}; - module.exports = ReactComponent;