Complete the code to import a React component into an Astro file.
import MyComponent from './components/MyComponent.[1]';
React components in Astro are usually imported from files with the .jsx extension.
Complete the code to render a React component inside an Astro file.
<MyComponent [1] />Use client:load directive to render React components in Astro when you want them to load immediately on the client.
Fix the error in the React component usage by completing the client directive.
<MyComponent [1] />The client:only directive ensures the React component is hydrated only on the client side.
Fill both blanks to correctly import and use a React component with client-only hydration.
import [1] from './components/Button.jsx'; <[2] client:only="react" />
The imported component name and the JSX tag must match exactly for React components in Astro.
Fill all three blanks to create a React component in Astro that passes props and uses client-only hydration.
import [1] from './components/Card.jsx'; <[2] title=[3] client:only="react" />
The component name must match in import and usage, and props should be passed as strings with quotes.