I’ve developed a tabbed UI dashboard in Next.js and React, where each new menu item opens in a new tab inside the dashboard panel. I can manage the tab mount state without issues.
However, I’m facing a problem with my <iframe> component: whenever I switch tabs and the component re-renders, the <iframe> reloads its URL. I want the <iframe> to retain its state and not reload when the tab changes or the component re-renders.
How can I prevent the <iframe> from reloading in this scenario?