#78 Data Communication From Parent to Child LWC Component | Salesforce | Message Passing

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2023
  • #78 Data Communication From Parent to Child LWC Component | Salesforce | Message Passing using @api decorator
    Learn & Get Udemy Certificate for this course "Learn Salesforce (Admin + Developer) with LWC Live Project". Check following link:
    www.udemy.com/course/learn-sa...
    Watch more videos on Salesforce (Admin + Developer) in following link:
    • Learn Salesforce (Admi...
    #78 Data Communication From Parent to Child LWC Component | Salesforce | Message Passing Message Passing using @api decorator
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 5

  • @Comrevo
    @Comrevo  10 หลายเดือนก่อน +2

    Learn & Get Udemy Certificate for this course "Learn Salesforce (Admin + Developer) with LWC Live Project". Check following link:
    www.udemy.com/course/learn-salesforce-admin-developer-with-lwc-live-project/?referralCode=B4FC77F9896FC0D472B4
    Watch more videos on Salesforce (Admin + Developer) in following link:
    th-cam.com/play/PLhbrpS8rYbc12z8u407IVygRHIYrNdM0T.html

  • @Vyshnavia-yt2tk
    @Vyshnavia-yt2tk 3 หลายเดือนก่อน +1

    difference between event.detail and event.target

    • @Comrevo
      @Comrevo  3 หลายเดือนก่อน

      In Salesforce Lightning Web Components (LWC), event.detail and event.target are both properties of an event object, but they serve different purposes.
      event.detail property provides additional data specific to the event. It's commonly used to pass data along with a custom event.
      event.target property represents the element that triggered the event. It's often used to access properties or attributes of the element that emitted the event. It is particularly useful in cases where you need to manipulate or retrieve information about the DOM element that triggered the event.

  • @RushikeshSatpute-gw7ok
    @RushikeshSatpute-gw7ok 2 หลายเดือนก่อน

    Lets Say if Child Component name is childcomponent
    and when I tried to add the same over parent Cmp it's throwing error. .
    I understand we should use naming conventions while creating LWC but still I want to know is there work around in such case.
    Also in this video you have fullName variable instead if fullname is the variable then how you have define in parent Cmp ?
    i.e: ?

    • @yatin1370
      @yatin1370 วันที่ผ่านมา

      There are some naming conventions in the programming world.
      For example lets take a string of words like 'breaking bad is the greatest series', normally which you see in any text/line in a paragraph.
      This will be as following in the below cases:
      1. Camel Case: breakingBadIsTheGreatestSeries
      2. Kebab Case: breaking-bad-is-the-greatest-series
      3. Snake Case: breaking_bad_is_the_greatest_series
      4. Pascal Case: BreakingBadIsTheGreatestSeries
      So camel case is used to name LWC components when creating them. And kebab case is used along with 'c-' namespace to embed a child component in parent.
      So if lets say you forget to use camel case like you said. If you name your child component 'childcomponent'. There is no two words anymore as there is not a capital letter.
      so you refer the component as to embed it in parent.
      Same logic for javascript property name as well.. if it was named as fullname you will mention as below:
      Hope this clears it..