You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
lovasoa
added a commit
to lovasoa/sveltestrap
that referenced
this issue
Jan 17, 2022
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
The text was updated successfully, but these errors were encountered: