Salesforce Fact #536 | Current component name in LWC
We can get the current component name in same LWC using the syntax: this.template.host.localName. It returns the component name in the format: <namespace>-<componentName> considering the Kebab case.
Reference: https://salesforce.stackexchange.com/questions/326166/can-an-lwc-component-get-its-own-name
Comments
Post a Comment