When rendering a on the server side, the initial render has all tabs disabled. We have to wait until the page is fully loaded and all the components are mounted on the client side for the active tab content to appear. This causes flickering, a bad user experience, and a bad SEO.
It first loads activeTabId from its parent. But the parent initially sets it to undefined.
Then it waits until it is mounted before sending to the parent the information that it is active.
Then it waits until it receives the same information back from the parent before finally setting tabOpen=true
When rendering a on the server side, the initial render has all tabs disabled. We have to wait until the page is fully loaded and all the components are mounted on the client side for the active tab content to appear. This causes flickering, a bad user experience, and a bad SEO.
The problem is in TabPane: https://github.com/bestguy/sveltestrap/blob/master/src/TabPane.svelte#L15-L21
It first loads activeTabId from its parent. But the parent initially sets it to undefined. Then it waits until it is mounted before sending to the parent the information that it is active. Then it waits until it receives the same information back from the parent before finally setting tabOpen=true