mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
1 parent
d673e51044
commit
3bf12bba0d
1 file changed
+7
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user