Astro
client:only
client:only is the Astro directive that skips server rendering for an island and renders it in the browser alone. You name the framework in the directive.
How it is measured
Write it as client:only="react" so Astro knows which runtime to load. The server HTML contains an empty placeholder. View source and you will find no output from the component.
Check what crawlers and no-JS users get by loading the page with scripts disabled. The area should be blank or show the fallback you provided in the slot.
Worked example
A map widget reads window.innerWidth and a browser-only mapping library on import. Server rendering throws on build, so the team marks it client:only="react". The built HTML has an empty div with a 400-pixel-high fallback in its place.
Search engines see the empty div. The address text next to the map stays as normal HTML so the page still reads as a contact page.
How it differs
client:only never renders on the server. client:media renders on the server and defers only the script. Only excludes server output; media excludes hydration on non-matching screens.
Common errors
Using it to dodge a fixable server error. Putting important text inside. Omitting the framework name. Forgetting a fallback so the layout jumps. Expecting it to improve performance by default.
In practice
Use it only for components that need browser APIs at import time. Add a fallback with the right height. Keep visible content outside it.