Remove deprecation warning for React statics
Marshall Roch committed
Dec 4, 2013 at 17:45 UTC
e3ad088ff317410fc562b559bebae210909749e0
2 files changed
+2
-7
src/core/ReactCompositeComponent.js
+1
-6
@@ -450,12 +450,7 @@ function mixSpecIntoComponent(ConvenienceConstructor, spec) {
450
if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
451
RESERVED_SPEC_KEYS[name](ConvenienceConstructor, property);
452
} else if (RESERVED_STATIC_SPEC_KEYS.hasOwnProperty(name)) {
453
- if (__DEV__) {
454
- console.warn(
455
- 'createClass(...): `' + name + '` is now a static property and ' +
456
- 'should be defined inside "statics".'
457
- );
458
- }
453
+ // TODO: deprecate this with a warning
454
RESERVED_STATIC_SPEC_KEYS[name](ConvenienceConstructor, property);
455
} else {
456
// Setup methods on prototype:
src/core/__tests__/ReactCompositeComponent-test.js
+1
-1
@@ -566,7 +566,7 @@ describe('ReactCompositeComponent', function() {
566
}
567
});
568
569
- it('should warn when using deprecated non-static spec keys', function() {
569
+ xit('should warn when using deprecated non-static spec keys', function() {
570
var warn = console.warn;
571
console.warn = mocks.getMockFunction();
572
try {