MDC Syntax Logo
A minimal example showing how to use MDC Syntax with React and Vite.
src/main.tsx
import { createRoot } from 'react-dom/client'
import { MDC } from 'mdc-syntax/react'

const el = document.getElementById('root')!

createRoot(el)
  .render(<MDC markdown={`# Hello *World*`} />)

This example demonstrates the simplest way to use MDC Syntax with React - just import the MDC component and pass it markdown content. The component handles parsing and rendering automatically.