Make components interactive using client directives
mainBy default, all components rendered in MDX are treated as static HTML with no client-side JavaScript. To make components interactive (e.g., components that handle clicks, state, or lifecycle hooks), you must use Astro's client directives.
Commonly used directives include client:load to load the component immediately on page load.
<ReactComponent client:load />