Frequently Asked LWC Interview Questions & Answers

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 58

  • @_infinityinsight_
    @_infinityinsight_ 2 місяці тому +2

    Hi Sir,
    1. For first question as you explained in the video we can use render() method, but as I understood, render() is not a life cycle hook.
    2. For the second question, we can use @api recordId, here we should use the name recordId only for variable name as it is a hardcoded value like data and error.

  • @ad123441
    @ad123441 8 місяців тому +6

    26.51 lightning:combobox

  • @atrivedi1000
    @atrivedi1000 5 місяців тому

    Nice video you have covered all basic and really important questions

  • @vitthalrakh5715
    @vitthalrakh5715 6 місяців тому +4

    Thanks Ankit ,This is very Helpful can I get pdf for this Question and ans?

  • @anilkumarsahu8546
    @anilkumarsahu8546 5 місяців тому

    simple but best and excellent!!

  • @tejaswipanchal4513
    @tejaswipanchal4513 Місяць тому

    Best explanation

  • @atulchopade9897
    @atulchopade9897 8 місяців тому +1

    33:01 We can use render method to switch between multiple html file, however it's not a life cycle method it's protected method provided by the framework.
    33:01 we can create a public property with @api recordId to get Id from if the LWC component placed on record page.

    • @TechJourneyWithAnkit
      @TechJourneyWithAnkit  8 місяців тому +1

      Yes catch is render is not a life cycle method , but we can use the protected method to do that

  • @NingannaKamalapure
    @NingannaKamalapure 8 місяців тому

    Lightning-combobox is used to display the picklist value to ui

  • @Saptarshi_101
    @Saptarshi_101 7 місяців тому

    Hey Ankit First of all thanks for the awesome contents.
    I had a doubt for Wire and connectedCallback order of execution scenario how many times the console log will be printed ? Even though wire is called twice I can see its getting printed only after connectedCallback.
    Clarify if possible.

  • @haribabuk5162
    @haribabuk5162 8 місяців тому +2

    lightning combox is used to display the picklist values of an object

  • @pranaysawarkar7071
    @pranaysawarkar7071 7 місяців тому

    hello ankit how are you i saw this video for my interview preparation in life cycle hooks you include only 5 life cycle hooks like constructor, connected callback, render callback, disconnected callback, and last one is error callback might be render is also consider as life cycle hook they are 6 might be not 5 can you please explain why you consider 5 only in ans.....!

    • @TechJourneyWithAnkit
      @TechJourneyWithAnkit  7 місяців тому

      No, the render method in Lightning Web Components (LWC) is not technically a lifecycle hook. It's a protected method in the LightningElement class that's similar to lifecycle hooks and is used to conditionally render a template.

    • @pranaysawarkar7071
      @pranaysawarkar7071 7 місяців тому

      But most of the people consider render as life cycle hook

  • @bandivamseekrishna973
    @bandivamseekrishna973 5 місяців тому

    1. render()
    2.In js file we write the @api recordId

  • @deepalitiwari6561
    @deepalitiwari6561 8 місяців тому

    Question asked from me -
    1. How to pass data from one component to another when they are not connected
    2. How to we make callouts in lwc
    3 . How we go next page in lwc
    4. Can we have multiple js and html files in lwc ?
    5. What should be the purpose and what are the benefits of having multiple js and html files
    6. Catchable= true , how it functions at the backend how it helps in fetching the data

    • @TechJourneyWithAnkit
      @TechJourneyWithAnkit  8 місяців тому

      Few of them already covered in part 2. Remaining will cover in part 3

  • @stoical_shorts1426
    @stoical_shorts1426 8 місяців тому +4

    Q.LWC is placed on record page and you want to get the record ud of the page. How can we do it?
    Ans :- import {LightningElement, api} from 'lwc';
    export default class example extends LightningElement{
    @api recordId;
    connectedCallback(){
    console.log ('This is the recordId of the page', this.recordId);
    }
    }
    Record Id : {$recordId}

    • @madhumohan2952
      @madhumohan2952 6 місяців тому +2

      In Html page we just need to keep {recordId} right ? no need of $ symbol

    • @mukeshrar265
      @mukeshrar265 3 місяці тому

      ​@@madhumohan2952yes

  • @luciferbhoi
    @luciferbhoi 8 місяців тому

    Hi Ankit, what are your thoughts of Data cloud, it is going to be the next big thing in Salesforce ecosystem?

    • @TechJourneyWithAnkit
      @TechJourneyWithAnkit  8 місяців тому

      Definitely it will be. Data Cloud + AI is future

    • @luciferbhoi
      @luciferbhoi 8 місяців тому +1

      @@TechJourneyWithAnkit Salesforce is pushing towards CRM+AI+Data with trust. I have started learning data cloud

    • @lalithaprathyusha8070
      @lalithaprathyusha8070 8 місяців тому +1

      @@TechJourneyWithAnkit Any series you will be planning on it

  • @shivam_diwan
    @shivam_diwan 4 місяці тому

    1. Render()
    2. @api recordId (in js)

  • @shivam_diwan
    @shivam_diwan 4 місяці тому

    why we don't touch constructor() for any logic?

  • @ravigrover1923
    @ravigrover1923 6 місяців тому

    Answer 1 : using render() method we can control which template will be visible
    Answer 2: In the controller of your LWC you can create a @api property with name recorded like below: @api recordId;

  • @haribabuk5162
    @haribabuk5162 8 місяців тому

    "When will the next class be?"

  • @Mahendra13189
    @Mahendra13189 8 місяців тому

    First question answer is using RenderedCallBack we can achieve it and Second question answer is Using Wire Decorator we can achieve it.

  • @momanddaughterchannel3938
    @momanddaughterchannel3938 8 місяців тому

    Render method

  • @harmeetsandhu8238
    @harmeetsandhu8238 7 місяців тому

    1.Render Method
    2.@api recordId

  • @momanddaughterchannel3938
    @momanddaughterchannel3938 8 місяців тому

    2. @api to get recordid