Semantic-ui-react: Thoughts on adding displayName?

Created on 16 Feb 2018  路  2Comments  路  Source: Semantic-Org/Semantic-UI-React

I noticed that none of the components in this library use displayName, which makes debugging a _whole_ lot easier. I'd be happy to go through and put up a PR, but I wanted to check with some of the maintainers if anyone has thoughts on the matter first, or if there was a specific reason it hadn't been done already (didn't see anything in the issue log though).

For those not familiar, if you've been debugging your app and noticed in react devtools that Semantic-UI-React components show up as things like <t>, that's an autogenerated name as a result of the fact that the component didn't have a displayName set.

Most helpful comment

Local development:

image


displayName is auto-generated during the build. If you're seeing those types of names, that is because you are running a minified build. It is a best practice to avoid minification during development as it is slow and destroys debugging capability as you mentioned.

We've gone through painstaking efforts to minimize the production bundle so I'm less inclined to ship display names to production.

All 2 comments

馃憢 Thanks for opening your first issue here! If you're reporting a 馃悶 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Local development:

image


displayName is auto-generated during the build. If you're seeing those types of names, that is because you are running a minified build. It is a best practice to avoid minification during development as it is slow and destroys debugging capability as you mentioned.

We've gone through painstaking efforts to minimize the production bundle so I'm less inclined to ship display names to production.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dylankiss picture dylankiss  路  22Comments

levithomason picture levithomason  路  47Comments

the-simian picture the-simian  路  24Comments

jeffcarbs picture jeffcarbs  路  53Comments

ryardley picture ryardley  路  27Comments