Enforce component name

Summary: When snapshotting, do not get affected by the building process.

Reviewed By: rafeca

Differential Revision: D8638527

fbshipit-source-id: 8335fc55c0c85f2ff110db338a5000c7af4b29aa
This commit is contained in:
Miguel Jimenez Esun 2018-06-26 07:38:22 -07:00 committed by Facebook Github Bot
parent fb2ec1ea47
commit 14cd15ef54
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ module.exports = (moduleName, instanceMethods) => {
typeof RealComponent === 'function' ? RealComponent : React.Component;
const Component = class extends SuperClass {
static displayName = 'Component';
render() {
const name =
RealComponent.displayName ||