Back to Withastro

Missing hint on client:only directive.

src/content/docs/en/reference/errors/no-client-only-hint.mdx

latest556 B
Original Source

import DontEditWarning from '~/components/DontEditWarning.astro'

<DontEditWarning />

NoClientOnlyHint: Unable to render COMPONENT_NAME. When using the client:only hydration strategy, Astro needs a hint to use the correct renderer.

What went wrong?

client:only components are not run on the server, as such Astro does not know (and cannot guess) which renderer to use and require a hint. Like such:

astro
	<SomeReactComponent client:only="react" />

See Also: