mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Remove deprecation warning for React statics
This commit is contained in:
1 parent
1b8bdbe177
commit
e3ad088ff3
2 files changed
+2
-7
No files matched your search
@@ -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