Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-wrap-display-name

A small tool for wrapping component display name

Usage

import wrapDisplayName from 'react-wrap-display-name';

const withMagic = (WrappedComponent) => {
    const InnerComponent = () => <WrappedComponent magic="Wingardium Leviosa" />;

    InnerComponent.displayName = wrapDisplayName(WrappedComponent, 'WithMagic');

    return InnerComponent;
};

About

A small tool for wrapping component display name

Resources

Stars

Watchers

Forks

Releases

Used by

Contributors

Languages