title: Call a method on switching between lightning tabs in salesforce using LWC
body: <p>I have 3 lightning tabs. I want to run a particular piece of code on switching between these tabs. Is there a way I can do it. I tried writing the code in <strong>renderedCallback</strong> and <strong>connectedCallback</strong>, but none of these methods are called on switching between tabs.</p>