Remove React.autoBind for real
This has been deprecated for a long while now, we should actually remove it.
Paul O'Shannessy committed
Sep 3, 2013 at 14:15 UTC
a42fd30fc2795909324c497350d0877a969b0cc7
2 files changed
-20
src/core/React.js
-1
@@ -37,7 +37,6 @@ var React = {
37
initializeTouchEvents: function(shouldUseTouch) {
38
ReactMount.useTouchEvents = shouldUseTouch;
39
},
40
- autoBind: ReactCompositeComponent.autoBind,
40
createClass: ReactCompositeComponent.createClass,
41
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
42
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
src/core/ReactCompositeComponent.js
-19
@@ -967,25 +967,6 @@ var ReactCompositeComponent = {
967
return componentClass instanceof Function &&
968
'componentConstructor' in componentClass &&
969
componentClass.componentConstructor instanceof Function;
970
- },
971
-
972
- /**
973
- * TODO: Delete this when all callers have been updated to rely on this
974
- * behavior being the default.
975
- *
976
- * Backwards compatible stub for what is now the default behavior.
977
- * @param {function} method Method to be bound.
978
- * @public
979
- */
980
- autoBind: function(method) {
981
- if (__DEV__) {
982
- console.warn(
983
- 'React.autoBind() is now deprecated. All React component methods ' +
984
- 'are auto bound by default, so React.autoBind() is a no-op. It ' +
985
- 'will be removed in the next version of React'
986
- );
987
- }
988
- return method;
970
}
971
};
972