Another Page

This page demonstrates using React components inside MDX, including interactive client components with state.

Code Example

let a = 1;

console.log(a);

Inline Component

You can define React components directly inside MDX files. Here's a counter built with useState:

External Component

Components can also be imported from separate files and used in MDX. This counter component is imported from components/counters.tsx:

Interactive Counter