From a42fd30fc2795909324c497350d0877a969b0cc7 Mon Sep 17 00:00:00 2001 From: Paul O'Shannessy Date: Tue, 3 Sep 2013 14:15:57 -0700 Subject: [PATCH] Remove React.autoBind for real This has been deprecated for a long while now, we should actually remove it. --- src/core/React.js | 1 - src/core/ReactCompositeComponent.js | 19 ------------------- 2 files changed, 20 deletions(-) diff --git a/src/core/React.js b/src/core/React.js index 511742b5c2..11a8d13c30 100644 --- a/src/core/React.js +++ b/src/core/React.js @@ -37,7 +37,6 @@ var React = { initializeTouchEvents: function(shouldUseTouch) { ReactMount.useTouchEvents = shouldUseTouch; }, - autoBind: ReactCompositeComponent.autoBind, createClass: ReactCompositeComponent.createClass, constructAndRenderComponent: ReactMount.constructAndRenderComponent, constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, diff --git a/src/core/ReactCompositeComponent.js b/src/core/ReactCompositeComponent.js index 08edadb7ef..af3537e969 100644 --- a/src/core/ReactCompositeComponent.js +++ b/src/core/ReactCompositeComponent.js @@ -967,25 +967,6 @@ var ReactCompositeComponent = { return componentClass instanceof Function && 'componentConstructor' in componentClass && componentClass.componentConstructor instanceof Function; - }, - - /** - * TODO: Delete this when all callers have been updated to rely on this - * behavior being the default. - * - * Backwards compatible stub for what is now the default behavior. - * @param {function} method Method to be bound. - * @public - */ - autoBind: function(method) { - if (__DEV__) { - console.warn( - 'React.autoBind() is now deprecated. All React component methods ' + - 'are auto bound by default, so React.autoBind() is a no-op. It ' + - 'will be removed in the next version of React' - ); - } - return method; } };