Saturday, July 18, 2020

How to give child components names in parent component in lightning web component(lwc)

Hello All,

when we are using child component into parent component with in Lightning web componet some time we are getting error :Failed to resolve entry for the module

To solve the error,  replace capital letters become lowercased and prefixed with a hyphen (-).

Examples:
Assume below names are the child component names

childNameInLWC
sampleTEST
sampleDataTableInfo
sampleDATAinLWC

refer above components like this in the parent component

<c-child-name-in-l-w-c></c-child-name-in-l-w-c>
<c-sample-t-e-s-t></c-sample-t-e-s-t>
<c-sample-data-table-info></c-sample-data-table-info>
<c-sample-d-a-t-a-in-l-w-c></c-sample-d-a-t-a-in-l-w-c>

Best practice tip
avoid more capital letters in your component name.

1 comment:

Anonymous said...

1xbet - No 1xbet Casino | Live dealer casino online
1xbet is a reliable casino site that offers titanium flat iron a www.jtmhub.com great casino febcasino games 1xbet korean from the best software providers for the regulated gambling markets. Rating: 8/10 · ‎Review https://tricktactoe.com/ by a Tripadvisor user · ‎Free · ‎Sports