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
karthik gorantlakarthik gorantla 

connectedcallback only once first time

Hi Every one, is there any way to stop calling connectedcallback in Lightning web components after first time? i am using parent- child components, inside the child component i have iframe which is initializing every time as url is defined in  connectcallback is calling, any way to call this only first time?

Appreciate immediate response !!
SwethaSwetha (Salesforce Developers) 
HI Karthik,
See https://salesforce.stackexchange.com/questions/313044/connectedcallback-isnt-getting-called-the-2nd-time-when-new-edit-view-button-is wherein the user's scenario was that ConnectedCallback isn't getting called the 2nd Time when New/Edit/View button is overridden with Aura Component which in turn calls LWC. You might want to implement a similar behavior. 

If this information helps, please mark the answer as best. Thank you