client:only directive and layout shift prevention
Client-Side Component Hydration Astro's client:only directive allows components to bypass server-side rendering (SSR) entirely, which is essential for components relying exclusively on browser-only APIs like localStorage or window . Hydration Constraints Because these components do not contribute to the initial HTML payload, there is a gap between the First