React in Astro

The following React component is loaded into an Astro island by the official @astrojs/react integration:

0

Astro's client:load directive is added to the component's props so Astro loads its JS on the client-side and hydrates it as an interactive component.

Learn more about Astro islands and hydration of framework components (e.g. React, Svelte, etc.) from the Astro Docs on Client Directives.