react-markdown

Sunday, January 22nd 2023

How to Setup React Markdown

Install npm dependencies:

$ yarn install react-markdown remark-gfm react-frontmatter

Pass in the 2 plugins.

import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import remarkFrontmatter from 'remark-frontmatter'; const markdown = `Just a link: https://reactjs.com.\n# Ola beaches.\n`; <ReactMarkdown remarkPlugins={[remarkGfm, remarkFrontmatter]}>{markdown}</ReactMarkdown>;