Usage

There's two ways to add an interactive example in MDX files. We call them inline and external examples.

External example

For more complex code, you can use "external" examples:

<code src="./snippets/Component.tsx" />

Inline example

For simpler cases, you can use "inline" examples:

```tsx live
export const App = () => {
  return <div>Hello World</div>;
}
```
NOTE

Both inline and external examples need to export a function that can be consumed by React.createElement. Even this will do: export default () => "Hey"