mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove deprecation warning for React statics
This commit is contained in:
committed by
Paul O’Shannessy
parent
1b8bdbe177
commit
e3ad088ff3
@@ -450,12 +450,7 @@ function mixSpecIntoComponent(ConvenienceConstructor, spec) {
|
||||
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
||||
RESERVED_SPEC_KEYS[name](ConvenienceConstructor, property);
|
||||
} else if (RESERVED_STATIC_SPEC_KEYS.hasOwnProperty(name)) {
|
||||
if (__DEV__) {
|
||||
console.warn(
|
||||
'createClass(...): `' + name + '` is now a static property and ' +
|
||||
'should be defined inside "statics".'
|
||||
);
|
||||
}
|
||||
// TODO: deprecate this with a warning
|
||||
RESERVED_STATIC_SPEC_KEYS[name](ConvenienceConstructor, property);
|
||||
} else {
|
||||
// Setup methods on prototype:
|
||||
|
||||
@@ -566,7 +566,7 @@ describe('ReactCompositeComponent', function() {
|
||||
}
|
||||
});
|
||||
|
||||
it('should warn when using deprecated non-static spec keys', function() {
|
||||
xit('should warn when using deprecated non-static spec keys', function() {
|
||||
var warn = console.warn;
|
||||
console.warn = mocks.getMockFunction();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user