Activity Forums Salesforce® Discussions What is the difference between disconnectedCallback and connectedCallback?

  • What is the difference between disconnectedCallback and connectedCallback?

    Posted by Saddam on October 1, 2019 at 6:18 am

    What is the difference between disconnectedCallback and connectedCallback?

    Nikita replied 4 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Nikita

    Member
    October 1, 2019 at 6:49 am

    Hi,

    disconnectedCallback()

    • Called when the element is removed from a document.
    • This hook flows from parent to child.

    connectedCallback()

    • Called when the element is inserted into a document.
    • This hook flows from parent to child.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos