What is the lightning__RecordPage target and how do LWC components declare targets?
Suggested answer
LWC components declare where they can be placed using the targets property in their .js-meta.xml configuration file. Common targets: lightning__RecordPage: Appears in Lightning App Builder on record detail pages. lightning__AppPage: Custom app pages. lightning__HomePage: The Home tab. lightning__FlowScreen: Can be used inside a Flow screen. lightningCommunity__Page: Experience Cloud pages. Target-specific properties (configurable in App Builder) are declared using <targetConfigs> and <targetConfig> tags. The property element within targetConfig exposes component properties as configurable attributes in App Builder without needing code changes. The objects attribute restricts a RecordPage component to specific object types. supportedFormFactors restricts to desktop or phone.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.