DEV Community

Discussion on: Tips on Creating Reusable Components

Collapse
haraldson profile image
Hein Haraldson Berg • Edited on

One could even go as far as doing

const IconAdder = ({ tag: Tag = 'a', children, ...props }) => (
    <Tag {...props}>
        <Icon />
        {" "}
        {children}
    </Tag>
)