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

devsli picture devsli  路  3Comments

ryanpcmcquen picture ryanpcmcquen  路  3Comments

jayphelps picture jayphelps  路  3Comments

eGust picture eGust  路  3Comments

dilizarov picture dilizarov  路  3Comments