const Component = withDisplayName('SomeName')(Example);
<Component {...props} />
// is equivalent to
<SomeName> // this is just a Fragment with displayName property as `SomeName`
<Example {...props} />
</SomeName>
withDisplayName('SomeName')(Example);
// or
withDisplayName('SomeName', Example);
// or
withDisplayName((Component) => 'SomeName.' + componentDisplayName.get(Component))(Example);
// or
withHocs([withDisplayName('SomeName')])(Example);
creates an empty component with a given display name for debugging the component tree
const Component = withDisplayName('SomeName')(Example);
<Component {...props} />
// is equivalent to
<SomeName> // this is just a Fragment with displayName property as `SomeName`
<Example {...props} />
</SomeName>
withDisplayName('SomeName')(Example);
// or
withDisplayName('SomeName', Example);
// or
withDisplayName((Component) => 'SomeName.' + componentDisplayName.get(Component))(Example);
// or
withHocs([withDisplayName('SomeName')])(Example);
creates an empty component with a given display name for debugging the component tree
const Component = withDisplayName('SomeName')(Example);
<Component {...props} />
// is equivalent to
<SomeName> // this is just a Fragment with displayName property as `SomeName`
<Example {...props} />
</SomeName>
withDisplayName('SomeName')(Example);
// or
withDisplayName('SomeName', Example);
// or
withDisplayName((Component) => 'SomeName.' + componentDisplayName.get(Component))(Example);
// or
withHocs([withDisplayName('SomeName')])(Example);
creates an empty component with a given display name for debugging the component tree
const Component = withDisplayName('SomeName')(Example);
<Component {...props} />
// is equivalent to
<SomeName> // this is just a Fragment with displayName property as `SomeName`
<Example {...props} />
</SomeName>
withDisplayName('SomeName')(Example);
// or
withDisplayName('SomeName', Example);
// or
withDisplayName((Component) => 'SomeName.' + componentDisplayName.get(Component))(Example);
// or
withHocs([withDisplayName('SomeName')])(Example);
Generated using TypeDoc
creates an empty component with a given display name for debugging the component tree