mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove React.autoBind for real
This has been deprecated for a long while now, we should actually remove it.
This commit is contained in:
committed by
Paul O’Shannessy
parent
406dcbd8da
commit
a42fd30fc2
@@ -37,7 +37,6 @@ var React = {
|
||||
initializeTouchEvents: function(shouldUseTouch) {
|
||||
ReactMount.useTouchEvents = shouldUseTouch;
|
||||
},
|
||||
autoBind: ReactCompositeComponent.autoBind,
|
||||
createClass: ReactCompositeComponent.createClass,
|
||||
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
|
||||
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user