add displayName to component spec functions

closes #992
This commit is contained in:
Paul O'Shannessy
2014-04-11 16:39:45 -07:00
committed by Paul O’Shannessy
parent d673e51044
commit 3bf12bba0d
+7
View File
@@ -494,6 +494,13 @@ function mixSpecIntoComponent(ConvenienceConstructor, spec) {
}
} else {
proto[name] = property;
if (__DEV__) {
// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if (typeof property === 'function' && spec.displayName) {
proto[name].displayName = spec.displayName + '_' + name;
}
}
}
}
}