Skip to content

[displayName] questioning if its still needed #10060

Closed
@Andarist

Description

@Andarist

When its used:

  • error messages
  • dev tools
  • HOCs

I would argue that its valuable only in DEV mode. Even when it comes to error messages I think I've never seen any production log containing it, I cannot be sure though if it never is.

And if its valuable only in DEV mode, shouldnt we just ditch adding them (or write a ditching transform/codemod) as they can be inferred from the functions/classes/variables anyway? The only remaining use case would be using displayName for HOCs.

If Im wrong let me know. This would however fix 2 minor problems:

  • smaller build outputs (slightly)
  • remove problem of unintentionally preventing tree-shaking of SFCs in flat bundles (more can be read here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions