How to get the name of component?
See original GitHub issueHi, I have a custom component:
class BaseComponent extends Component { xxxxxx }
And now i use this.constructor.name
return the right name: BaseComponent in dev environment, but it return value: t in release environment.
I want to get the right name of component, what should i do?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Get component name in React - Stack Overflow
Class Components. You can use this.constructor.name to obtain the name of your component. (Using React 16.x as of this writing).
Read more >React get components name | Sololearn: Learn to code for ...
Hello everyone! given a react component, is it possible to get the name of the class that component is instance of? something like...
Read more >How to get the class (component's) name in angular. - Medium
Recently i've encountered a problem where i wanted to have a list of different reusable “dynamic” components nested in a wrapper component in ......
Read more >How to get component name? - Vue Forum
Hi there! and take a peak inside. In this case, your “name” property is found under the $options property.
Read more >Solved: Component name as text - Power Platform Community
I have a component called "Q" with a label object called "QText". I want "QText.Text" property to have the valve of Q component...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I got it!
@Haiwen01 how to resolve this problem?