Skip to content

[material-ui-icons] reduce code duplication? #10900

@cherniavskii

Description

@cherniavskii

I've noticed, that every file in src directory implements props forwarding, sets muiName, checks global.__MUI_SvgIcon__ and so on, which leads to code duplication in bundle.

Generally, the unique content of every icon is it's path. All other stuff is common for every icon.

So it should be possible to create single HOC, which does all common stuff. Then use it in every file, providing path and export the result.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions