function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jradjrad 

Call lwc method from aura parent after loading

I have an LWC with a public method @show().  This needs to fire on the lwc when it's parents aura component finishes loading.

I have tried doInit, all the render functions and none of them work.

I added a button on the aura parent and handleButtonClick handler - when clicking it fires the @show method and displays.  This is not my ideal functionality.

 I'm looking for a way to fire the @show method on the LWC child when the aura parent finishes loading.  How do I do this?

this works great:

handleClick: function (component, event, helper) {
component.find('childlwc').show();
}

What i'm looking for is a way to call the show method on childlwc once the page finishes loading.

Thanks!
Shubham Verma 69Shubham Verma 69
Hi Jeremy,

You can use connectedCallback method in LWC to call your show method. connectedCallBack works like doInit menthod in aura.

Thanks,
Shubham