RE

React Markdown

react-markdown

React component to render markdown

Component Libraries
ast
commonmark
component
gfm
markdown
react
react-component
remark
unified
react-markdown
Stars
16k
Weekly
30M
Open issues
5
Bundle
~15 kB

Installation

npm install react-markdown

Code example

import Markdown from "react-markdown";

export function Example() {
  return <Markdown>{"# Hello\nThis is **markdown**."}</Markdown>;
}

Pros & cons

Pros

  • Actively maintained by Espen Hovlandsdal
  • 30M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 5 open issues on GitHub

FAQs

Alternatives & similar libraries