Skip to content

React Markdown

React Markdown is a component that allows you to render Markdown as React components. It is used by the Djot client to render Markdown files.

Full documentation: https://remarkjs.github.io/react-markdown/

Usage

tsx
import ReactMarkdown from 'react-markdown';

const markdownContent = `# Hello, world!
- This
- is
- a
- [Markdown](https://www.markdownguide.org/)
- example

`

export const App = () => (
  <ReactMarkdown>
    {markdownContent}
  </ReactMarkdown>
);
import ReactMarkdown from 'react-markdown';

const markdownContent = `# Hello, world!
- This
- is
- a
- [Markdown](https://www.markdownguide.org/)
- example

`

export const App = () => (
  <ReactMarkdown>
    {markdownContent}
  </ReactMarkdown>
);